[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2008-05-01 Thread changelog
changelog   Fri May  2 01:31:44 2008 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3033r2=1.3034diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.3033 php-src/ChangeLog:1.3034
--- php-src/ChangeLog:1.3033Thu May  1 01:31:45 2008
+++ php-src/ChangeLog   Fri May  2 01:31:43 2008
@@ -1,3 +1,87 @@
+2008-05-01  Derick Rethans  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/date/php_date.c
+  ext/date/lib/parse_date.c
+  ext/date/lib/parse_date.re
+  ext/date/lib/timelib.c
+  ext/date/lib/timelib_structs.h
+  ext/date/lib/tm2unixtime.c:
+  - MFH: Rearranged some structures to allow for more powerfull
+  period/intervals.
+
+* ext/date/php_date.c
+  ext/date/lib/parse_date.c
+  ext/date/lib/parse_date.re
+  ext/date/lib/timelib.c
+  ext/date/lib/timelib_structs.h
+  ext/date/lib/tm2unixtime.c:
+  - Rearranged some structures to allow for more powerfull 
period/intervals.
+
+* (PHP_5_3)
+  ext/date/php_date.c:
+  - MFH: Include the starting date by default in the iterator output, but 
add
+  an
+option to disable this behavior.
+
+* ext/date/php_date.c:
+  - Include the starting date by default in the iterator output, but add an
+option to disable this behavior.
+
+2008-05-01  Ant Phillips  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/standard/tests/dir/open_basedir.inc
+  ext/standard/tests/dir/open_basedir.inc
+  ext/standard/tests/dir/open_basedir_dir.phpt
+  ext/standard/tests/dir/open_basedir_dir.phpt
+  ext/standard/tests/dir/open_basedir_dir.phpt
+  ext/standard/tests/dir/open_basedir_dir.phpt
+  ext/standard/tests/dir/open_basedir_dir.phpt
+  ext/standard/tests/dir/open_basedir_opendir.phpt
+  ext/standard/tests/dir/open_basedir_opendir.phpt
+  ext/standard/tests/dir/open_basedir_opendir.phpt
+  ext/standard/tests/dir/open_basedir_opendir.phpt
+  ext/standard/tests/dir/open_basedir_opendir.phpt
+  ext/standard/tests/dir/open_basedir_scandir.phpt
+  ext/standard/tests/dir/open_basedir_scandir.phpt:
+  open_basedir tests for directory functions
+
+* ext/standard/tests/dir/open_basedir.inc
+  ext/standard/tests/dir/open_basedir.inc
+  ext/standard/tests/dir/open_basedir.inc
+  ext/standard/tests/dir/open_basedir_dir.phpt
+  ext/standard/tests/dir/open_basedir_dir.phpt
+  ext/standard/tests/dir/open_basedir_dir.phpt
+  ext/standard/tests/dir/open_basedir_opendir.phpt
+  ext/standard/tests/dir/open_basedir_opendir.phpt
+  ext/standard/tests/dir/open_basedir_opendir.phpt
+  ext/standard/tests/dir/open_basedir_scandir.phpt
+  ext/standard/tests/dir/open_basedir_scandir.phpt
+  ext/standard/tests/dir/open_basedir_scandir.phpt:
+1.1.4;
+  open_basedir tests for directory functions
+
+2008-05-01  Derick Rethans  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  NEWS
+  ext/date/php_date.c
+  ext/date/php_date.h
+  ext/date/lib/timelib.c
+  ext/date/lib/timelib.h:
+  - MFH: Added the DatePeriod class/iterator that iterates over a date time
+object for a specific number of iterators and applies a DateInterval
+  each
+time.
+
+* ext/date/php_date.c
+  ext/date/php_date.h
+  ext/date/lib/timelib.c
+  ext/date/lib/timelib.h:
+  - Added the DatePeriod class/iterator that iterates over a date time 
object
+for a specific number of iterators and applies a DateInterval each 
time.
+
 2008-04-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 
 * (PHP_5_2)




[PHP-CVS] cvs: php-src /ext/standard/tests/dir open_basedir.inc open_basedir_dir.phpt open_basedir_opendir.phpt open_basedir_scandir.phpt

2008-05-01 Thread Ant Phillips
ant Thu May  1 11:46:17 2008 UTC

  Added files: 
/php-src/ext/standard/tests/dir open_basedir_scandir.phpt 
open_basedir_dir.phpt 
open_basedir.inc 
open_basedir_opendir.phpt 
  Log:
  open_basedir tests for directory functions
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/open_basedir_scandir.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/dir/open_basedir_scandir.phpt
+++ php-src/ext/standard/tests/dir/open_basedir_scandir.phpt
--TEST--
Test open_basedir configuration
--INI--
open_basedir=.
--FILE--
?php
require_once open_basedir.inc;
test_open_basedir_before(scandir);
test_open_basedir_error(scandir); 

$directory = dirname(__FILE__);
var_dump(scandir($directory./test/ok/));
var_dump(scandir($directory./test/ok));
var_dump(scandir($directory./test/ok/../ok));

test_open_basedir_after(scandir);?
--CLEAN--
?php
require_once open_basedir.inc;
delete_directories();
?
--EXPECTF--
*** Testing open_basedir configuration [scandir] ***
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)

Warning: scandir(): open_basedir restriction in effect. File(../bad) is not 
within the allowed path(s): (.) in %s on line %d

Warning: scandir(../bad): failed to open dir: Operation not permitted in %s on 
line %d

Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
bool(false)

Warning: scandir(): open_basedir restriction in effect. File(../bad/bad.txt) is 
not within the allowed path(s): (.) in %s on line %d

Warning: scandir(../bad/bad.txt): failed to open dir: Operation not permitted 
in %s on line %d

Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
bool(false)

Warning: scandir(): open_basedir restriction in effect. File(..) is not within 
the allowed path(s): (.) in %s on line %d

Warning: scandir(..): failed to open dir: Operation not permitted in %s on line 
%d

Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
bool(false)

Warning: scandir(): open_basedir restriction in effect. File(../) is not within 
the allowed path(s): (.) in %s on line 80

Warning: scandir(../): failed to open dir: Operation not permitted in %s on 
line %d

Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
bool(false)

Warning: scandir(): open_basedir restriction in effect. File(/) is not within 
the allowed path(s): (.) in %s on line %d

Warning: scandir(/): failed to open dir: Operation not permitted in %s on line 
%d

Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
bool(false)

Warning: scandir(): open_basedir restriction in effect. File(../bad/.) is not 
within the allowed path(s): (.) in %s on line %d

Warning: scandir(../bad/.): failed to open dir: Operation not permitted in %s 
on line %d

Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
bool(false)

Warning: scandir(): open_basedir restriction in effect. 
File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line 
%d

Warning: scandir(%s/test/bad/bad.txt): failed to open dir: Operation not 
permitted in %s on line %d

Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
bool(false)

Warning: scandir(): open_basedir restriction in effect. 
File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s 
on line %d

Warning: scandir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation not 
permitted in %s on line %d

Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
bool(false)
array(3) {
  [0]=
  string(1) .
  [1]=
  string(2) ..
  [2]=
  string(6) ok.txt
}
array(3) {
  [0]=
  string(1) .
  [1]=
  string(2) ..
  [2]=
  string(6) ok.txt
}
array(3) {
  [0]=
  string(1) .
  [1]=
  string(2) ..
  [2]=
  string(6) ok.txt
}
*** Finished testing open_basedir configuration [scandir] ***
--UEXPECTF--
*** Testing open_basedir configuration [scandir] ***
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)

Warning: scandir(): open_basedir restriction in effect. File(../bad) is not 
within the allowed path(s): (.) in %s on line %d

Warning: scandir(../bad): failed to open dir: Operation not permitted in %s on 
line %d

Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
bool(false)

Warning: scandir(): open_basedir restriction in effect. File(../bad/bad.txt) is 
not within the allowed path(s): (.) in %s on line %d

Warning: scandir(../bad/bad.txt): failed to open dir: Operation not permitted 
in %s on line %d

Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
bool(false)

Warning: scandir(): open_basedir restriction in effect. File(..) is not within 
the allowed path(s): (.) in %s on line %d

Warning: scandir(..): failed to open dir: Operation not permitted in %s on line 
%d

Warning: scandir(): (errno 1): Operation not permitted in %s on line %d

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/dir open_basedir.inc open_basedir_dir.phpt open_basedir_opendir.phpt open_basedir_scandir.phpt

2008-05-01 Thread Ant Phillips
ant Thu May  1 11:46:18 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/dir open_basedir_opendir.phpt 
open_basedir.inc 
open_basedir_dir.phpt 
open_basedir_scandir.phpt 
  Log:
  open_basedir tests for directory functions
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/open_basedir_opendir.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/dir/open_basedir_opendir.phpt
+++ php-src/ext/standard/tests/dir/open_basedir_opendir.phpt
--TEST--
Test open_basedir configuration
--INI--
open_basedir=.
--FILE--
?php
require_once open_basedir.inc;
test_open_basedir_before(opendir);
test_open_basedir_error(opendir); 

$directory = dirname(__FILE__);
var_dump(opendir($directory./test/ok/));
var_dump(opendir($directory./test/ok));
var_dump(opendir($directory./test/ok/../ok));

test_open_basedir_after(opendir);?
--CLEAN--
?php
require_once open_basedir.inc;
delete_directories();
?
--EXPECTF--
*** Testing open_basedir configuration [opendir] ***
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)

Warning: opendir(): open_basedir restriction in effect. File(../bad) is not 
within the allowed path(s): (.) in %s on line %d

Warning: opendir(../bad): failed to open dir: Operation not permitted in %s on 
line %d
bool(false)

Warning: opendir(): open_basedir restriction in effect. File(../bad/bad.txt) is 
not within the allowed path(s): (.) in %s on line %d

Warning: opendir(../bad/bad.txt): failed to open dir: Operation not permitted 
in %s on line %d
bool(false)

Warning: opendir(): open_basedir restriction in effect. File(..) is not within 
the allowed path(s): (.) in %s on line %d

Warning: opendir(..): failed to open dir: Operation not permitted in %s on line 
%d
bool(false)

Warning: opendir(): open_basedir restriction in effect. File(../) is not within 
the allowed path(s): (.) in %s on line %d

Warning: opendir(../): failed to open dir: Operation not permitted in %s on 
line %d
bool(false)

Warning: opendir(): open_basedir restriction in effect. File(/) is not within 
the allowed path(s): (.) in %s on line %d

Warning: opendir(/): failed to open dir: Operation not permitted in %s on line 
%d
bool(false)

Warning: opendir(): open_basedir restriction in effect. File(../bad/.) is not 
within the allowed path(s): (.) in %s on line %d

Warning: opendir(../bad/.): failed to open dir: Operation not permitted in %s 
on line %d
bool(false)

Warning: opendir(): open_basedir restriction in effect. 
File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line 
%d

Warning: opendir(%s/test/bad/bad.txt): failed to open dir: Operation not 
permitted in %s on line %d
bool(false)

Warning: opendir(): open_basedir restriction in effect. 
File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s 
on line %d

Warning: opendir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation not 
permitted in %s on line %d
bool(false)
resource(8) of type (stream)
resource(9) of type (stream)
resource(10) of type (stream)
*** Finished testing open_basedir configuration [opendir] ***


http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/open_basedir.inc?view=markuprev=1.1
Index: php-src/ext/standard/tests/dir/open_basedir.inc
+++ php-src/ext/standard/tests/dir/open_basedir.inc
?php

// This file contains helper functions for testing open_basedir configuration
// Care must be taken with where the directories are created because different
// SAPIs set the working directory differently. So simply creating a directory
// relative to the current working directory like this: mkdir(blah) might 
// actually create it in several different places depending on the SAPI..!
//
// Note also depending on the version of php being tested, so the open_basedir
// configuration may or may not be changeable from a script (PHP_INI_SYSTEM).
//
// For this reason we set the open_basedir to . (current directory) and then
// move around to various directories for testing using chdir(). This is NOT
// recommended for production use as . bypasses all semblence of security..!
//
// Although safe mode has been removed in php 6.0, open_basedir is still valid.
//  See http://www.php.net/features.safe-mode for more information

function recursive_delete_directory($directory) {

// Remove any trailing slash first
if (substr($directory, -1) == '/') {
$directory = substr($directory, 0, -1);
}

// Make sure the directory is valid
if (is_dir($directory) == FALSE) {
return FALSE;
} 

// Check we can access the directory
if (is_readable($directory) == FALSE) {
return FALSE;
}

$handle = opendir($directory);

// Scan through the directory contents
while (FALSE !== ($item = readdir($handle))) {
if ($item != '.') {
 if ($item != '..') {

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/dir open_basedir.inc open_basedir_dir.phpt open_basedir_opendir.phpt open_basedir_scandir.phpt

2008-05-01 Thread Ant Phillips
ant Thu May  1 11:46:20 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/dir open_basedir_opendir.phpt 
open_basedir.inc 
open_basedir_scandir.phpt 
open_basedir_dir.phpt 
  Log:
  open_basedir tests for directory functions
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/open_basedir_opendir.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/dir/open_basedir_opendir.phpt
+++ php-src/ext/standard/tests/dir/open_basedir_opendir.phpt
--TEST--
Test open_basedir configuration
--INI--
open_basedir=.
--FILE--
?php
require_once open_basedir.inc;
test_open_basedir_before(opendir);
test_open_basedir_error(opendir); 

$directory = dirname(__FILE__);
var_dump(opendir($directory./test/ok/));
var_dump(opendir($directory./test/ok));
var_dump(opendir($directory./test/ok/../ok));

test_open_basedir_after(opendir);?
--CLEAN--
?php
require_once open_basedir.inc;
delete_directories();
?
--EXPECTF--
*** Testing open_basedir configuration [opendir] ***
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)

Warning: opendir(): open_basedir restriction in effect. File(../bad) is not 
within the allowed path(s): (.) in %s on line %d

Warning: opendir(../bad): failed to open dir: Operation not permitted in %s on 
line %d
bool(false)

Warning: opendir(): open_basedir restriction in effect. File(../bad/bad.txt) is 
not within the allowed path(s): (.) in %s on line %d

Warning: opendir(../bad/bad.txt): failed to open dir: Operation not permitted 
in %s on line %d
bool(false)

Warning: opendir(): open_basedir restriction in effect. File(..) is not within 
the allowed path(s): (.) in %s on line %d

Warning: opendir(..): failed to open dir: Operation not permitted in %s on line 
%d
bool(false)

Warning: opendir(): open_basedir restriction in effect. File(../) is not within 
the allowed path(s): (.) in %s on line %d

Warning: opendir(../): failed to open dir: Operation not permitted in %s on 
line %d
bool(false)

Warning: opendir(): open_basedir restriction in effect. File(/) is not within 
the allowed path(s): (.) in %s on line %d

Warning: opendir(/): failed to open dir: Operation not permitted in %s on line 
%d
bool(false)

Warning: opendir(): open_basedir restriction in effect. File(../bad/.) is not 
within the allowed path(s): (.) in %s on line %d

Warning: opendir(../bad/.): failed to open dir: Operation not permitted in %s 
on line %d
bool(false)

Warning: opendir(): open_basedir restriction in effect. 
File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line 
%d

Warning: opendir(%s/test/bad/bad.txt): failed to open dir: Operation not 
permitted in %s on line %d
bool(false)

Warning: opendir(): open_basedir restriction in effect. 
File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s 
on line %d

Warning: opendir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation not 
permitted in %s on line %d
bool(false)
resource(8) of type (stream)
resource(9) of type (stream)
resource(10) of type (stream)
*** Finished testing open_basedir configuration [opendir] ***


http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/open_basedir.inc?view=markuprev=1.1
Index: php-src/ext/standard/tests/dir/open_basedir.inc
+++ php-src/ext/standard/tests/dir/open_basedir.inc
?php

// This file contains helper functions for testing open_basedir configuration
// Care must be taken with where the directories are created because different
// SAPIs set the working directory differently. So simply creating a directory
// relative to the current working directory like this: mkdir(blah) might 
// actually create it in several different places depending on the SAPI..!
//
// Note also depending on the version of php being tested, so the open_basedir
// configuration may or may not be changeable from a script (PHP_INI_SYSTEM).
//
// For this reason we set the open_basedir to . (current directory) and then
// move around to various directories for testing using chdir(). This is NOT
// recommended for production use as . bypasses all semblence of security..!
//
// Although safe mode has been removed in php 6.0, open_basedir is still valid.
//  See http://www.php.net/features.safe-mode for more information

function recursive_delete_directory($directory) {

// Remove any trailing slash first
if (substr($directory, -1) == '/') {
$directory = substr($directory, 0, -1);
}

// Make sure the directory is valid
if (is_dir($directory) == FALSE) {
return FALSE;
} 

// Check we can access the directory
if (is_readable($directory) == FALSE) {
return FALSE;
}

$handle = opendir($directory);

// Scan through the directory contents
while (FALSE !== ($item = readdir($handle))) {
if ($item != '.') {
 if ($item != '..') {

[PHP-CVS] cvs: php-src /ext/standard/tests/dir open_basedir_dir.phpt open_basedir_opendir.phpt

2008-05-01 Thread Ant Phillips
ant Thu May  1 12:36:44 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/dir open_basedir_dir.phpt 
open_basedir_opendir.phpt 
  Log:
  open_basedir tests for directory functions
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/open_basedir_dir.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/dir/open_basedir_dir.phpt
diff -u php-src/ext/standard/tests/dir/open_basedir_dir.phpt:1.1 
php-src/ext/standard/tests/dir/open_basedir_dir.phpt:1.2
--- php-src/ext/standard/tests/dir/open_basedir_dir.phpt:1.1Thu May  1 
11:46:17 2008
+++ php-src/ext/standard/tests/dir/open_basedir_dir.phptThu May  1 
12:36:44 2008
@@ -66,19 +66,19 @@
 
 Warning: dir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation not 
permitted in %s on line %d
 bool(false)
-object(Directory)#1 (2) {
+object(Directory)#%d (2) {
   [path]=
   string(%d) %s/test/ok/
   [handle]=
   resource(%d) of type (stream)
 }
-object(Directory)#1 (2) {
+object(Directory)#%d (2) {
   [path]=
   string(%d) %s/test/ok
   [handle]=
   resource(%d) of type (stream)
 }
-object(Directory)#1 (2) {
+object(Directory)#%d (2) {
   [path]=
   string(%d) %s/test/ok/../ok
   [handle]=
@@ -132,19 +132,19 @@
 
 Warning: dir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation not 
permitted in %s on line %d
 bool(false)
-object(Directory)#1 (2) {
+object(Directory)#%d (2) {
   [upath]=
   unicode(%d) %s/test/ok/
   [uhandle]=
   resource(%d) of type (stream)
 }
-object(Directory)#1 (2) {
+object(Directory)#%d (2) {
   [upath]=
   unicode(%d) %s/test/ok
   [uhandle]=
   resource(%d) of type (stream)
 }
-object(Directory)#1 (2) {
+object(Directory)#%d (2) {
   [upath]=
   unicode(%d) %s/test/ok/../ok
   [uhandle]=
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/open_basedir_opendir.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/dir/open_basedir_opendir.phpt
diff -u php-src/ext/standard/tests/dir/open_basedir_opendir.phpt:1.1 
php-src/ext/standard/tests/dir/open_basedir_opendir.phpt:1.2
--- php-src/ext/standard/tests/dir/open_basedir_opendir.phpt:1.1Thu May 
 1 11:46:17 2008
+++ php-src/ext/standard/tests/dir/open_basedir_opendir.phptThu May  1 
12:36:44 2008
@@ -66,8 +66,8 @@
 
 Warning: opendir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation 
not permitted in %s on line %d
 bool(false)
-resource(8) of type (stream)
-resource(9) of type (stream)
-resource(10) of type (stream)
+resource(%d) of type (stream)
+resource(%d) of type (stream)
+resource(%d) of type (stream)
 *** Finished testing open_basedir configuration [opendir] ***
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/dir open_basedir_dir.phpt open_basedir_opendir.phpt

2008-05-01 Thread Ant Phillips
ant Thu May  1 12:36:45 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/dir open_basedir_opendir.phpt 
open_basedir_dir.phpt 
  Log:
  open_basedir tests for directory functions
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/open_basedir_opendir.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/standard/tests/dir/open_basedir_opendir.phpt
diff -u php-src/ext/standard/tests/dir/open_basedir_opendir.phpt:1.1.4.2 
php-src/ext/standard/tests/dir/open_basedir_opendir.phpt:1.1.4.3
--- php-src/ext/standard/tests/dir/open_basedir_opendir.phpt:1.1.4.2Thu May 
 1 11:46:20 2008
+++ php-src/ext/standard/tests/dir/open_basedir_opendir.phptThu May  1 
12:36:45 2008
@@ -66,8 +66,8 @@
 
 Warning: opendir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation 
not permitted in %s on line %d
 bool(false)
-resource(8) of type (stream)
-resource(9) of type (stream)
-resource(10) of type (stream)
+resource(%d) of type (stream)
+resource(%d) of type (stream)
+resource(%d) of type (stream)
 *** Finished testing open_basedir configuration [opendir] ***
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/open_basedir_dir.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/standard/tests/dir/open_basedir_dir.phpt
diff -u php-src/ext/standard/tests/dir/open_basedir_dir.phpt:1.1.4.2 
php-src/ext/standard/tests/dir/open_basedir_dir.phpt:1.1.4.3
--- php-src/ext/standard/tests/dir/open_basedir_dir.phpt:1.1.4.2Thu May 
 1 11:46:20 2008
+++ php-src/ext/standard/tests/dir/open_basedir_dir.phptThu May  1 
12:36:45 2008
@@ -66,19 +66,19 @@
 
 Warning: dir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation not 
permitted in %s on line %d
 bool(false)
-object(Directory)#1 (2) {
+object(Directory)#%d (2) {
   [path]=
   string(%d) %s/test/ok/
   [handle]=
   resource(%d) of type (stream)
 }
-object(Directory)#1 (2) {
+object(Directory)#%d (2) {
   [path]=
   string(%d) %s/test/ok
   [handle]=
   resource(%d) of type (stream)
 }
-object(Directory)#1 (2) {
+object(Directory)#%d (2) {
   [path]=
   string(%d) %s/test/ok/../ok
   [handle]=



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/dir open_basedir_dir.phpt open_basedir_opendir.phpt

2008-05-01 Thread Ant Phillips
ant Thu May  1 12:36:46 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/dir open_basedir_opendir.phpt 
open_basedir_dir.phpt 
  Log:
  open_basedir tests for directory functions
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/open_basedir_opendir.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/dir/open_basedir_opendir.phpt
diff -u php-src/ext/standard/tests/dir/open_basedir_opendir.phpt:1.1.2.2 
php-src/ext/standard/tests/dir/open_basedir_opendir.phpt:1.1.2.3
--- php-src/ext/standard/tests/dir/open_basedir_opendir.phpt:1.1.2.2Thu May 
 1 11:46:18 2008
+++ php-src/ext/standard/tests/dir/open_basedir_opendir.phptThu May  1 
12:36:46 2008
@@ -66,8 +66,8 @@
 
 Warning: opendir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation 
not permitted in %s on line %d
 bool(false)
-resource(8) of type (stream)
-resource(9) of type (stream)
-resource(10) of type (stream)
+resource(%d) of type (stream)
+resource(%d) of type (stream)
+resource(%d) of type (stream)
 *** Finished testing open_basedir configuration [opendir] ***
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/open_basedir_dir.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/dir/open_basedir_dir.phpt
diff -u php-src/ext/standard/tests/dir/open_basedir_dir.phpt:1.1.2.2 
php-src/ext/standard/tests/dir/open_basedir_dir.phpt:1.1.2.3
--- php-src/ext/standard/tests/dir/open_basedir_dir.phpt:1.1.2.2Thu May 
 1 11:46:18 2008
+++ php-src/ext/standard/tests/dir/open_basedir_dir.phptThu May  1 
12:36:46 2008
@@ -66,19 +66,19 @@
 
 Warning: dir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation not 
permitted in %s on line %d
 bool(false)
-object(Directory)#1 (2) {
+object(Directory)#%d (2) {
   [path]=
   string(%d) %s/test/ok/
   [handle]=
   resource(%d) of type (stream)
 }
-object(Directory)#1 (2) {
+object(Directory)#%d (2) {
   [path]=
   string(%d) %s/test/ok
   [handle]=
   resource(%d) of type (stream)
 }
-object(Directory)#1 (2) {
+object(Directory)#%d (2) {
   [path]=
   string(%d) %s/test/ok/../ok
   [handle]=



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date php_date.c

2008-05-01 Thread Derick Rethans
derick  Thu May  1 13:31:01 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Include the starting date by default in the iterator output, but add an
option to disable this behavior.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.179r2=1.180diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.179 php-src/ext/date/php_date.c:1.180
--- php-src/ext/date/php_date.c:1.179   Thu May  1 00:10:25 2008
+++ php-src/ext/date/php_date.c Thu May  1 13:31:00 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.179 2008/05/01 00:10:25 derick Exp $ */
+/* $Id: php_date.c,v 1.180 2008/05/01 13:31:00 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -333,6 +333,7 @@
timelib_rel_time *interval;
int   recurrences;
int   initialized;
+   int   include_start_date;
 };
 
 #define DATE_SET_CONTEXT \
@@ -1696,6 +1697,8 @@
 #define PHP_DATE_TIMEZONE_GROUP_ALL0x07FF
 #define PHP_DATE_TIMEZONE_GROUP_ALL_W_BC   0x0FFF
 
+#define PHP_DATE_PERIOD_EXCLUDE_START_DATE 0x0001
+
 
 /* define an overloaded iterator structure */
 typedef struct {
@@ -1750,18 +1753,20 @@
timelib_time *it_time = object-start;
php_date_obj *newdateobj;
 
-   /* apply modification */
-   it_time-relative.y = object-interval-y;
-   it_time-relative.m = object-interval-m;
-   it_time-relative.d = object-interval-d;
-   it_time-relative.h = object-interval-h;
-   it_time-relative.i = object-interval-i;
-   it_time-relative.s = object-interval-s;
-   it_time-relative.weekday = object-interval-weekday;
-   it_time-have_relative = 1;
-   it_time-sse_uptodate = 0;
-   timelib_update_ts(it_time, NULL);
-   timelib_update_from_sse(it_time);
+   /* apply modification if it's not the first iteration */
+   if (!object-include_start_date || iterator-current_index  0) {
+   it_time-relative.y = object-interval-y;
+   it_time-relative.m = object-interval-m;
+   it_time-relative.d = object-interval-d;
+   it_time-relative.h = object-interval-h;
+   it_time-relative.i = object-interval-i;
+   it_time-relative.s = object-interval-s;
+   it_time-relative.weekday = object-interval-weekday;
+   it_time-have_relative = 1;
+   it_time-sse_uptodate = 0;
+   timelib_update_ts(it_time, NULL);
+   timelib_update_from_sse(it_time);
+   }
 
/* Create new object */
MAKE_STD_ZVAL(iterator-current);
@@ -1915,6 +1920,11 @@
zend_class_implements(date_ce_period TSRMLS_CC, 1, zend_ce_traversable);
memcpy(date_object_handlers_period, zend_get_std_object_handlers(), 
sizeof(zend_object_handlers));
date_object_handlers_period.clone_obj = date_object_clone_period;
+
+#define REGISTER_PERIOD_CLASS_CONST_STRING(const_name, value) \
+   zend_declare_class_constant_long(date_ce_period, const_name, 
sizeof(const_name)-1, value TSRMLS_CC);
+
+   REGISTER_PERIOD_CLASS_CONST_STRING(EXCLUDE_START_DATE, 
PHP_DATE_PERIOD_EXCLUDE_START_DATE);
 }
 
 static inline zend_object_value date_object_new_date_ex(zend_class_entry 
*class_type, php_date_obj **ptr TSRMLS_DC)
@@ -3514,11 +3524,11 @@
php_date_obj *dateobj;
php_interval_obj *intobj;
zval *start, *interval;
-   long  recurrences;
+   long  recurrences, options = 0;
timelib_time *clone;

php_set_error_handling(EH_THROW, NULL TSRMLS_CC);
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, OOl, start, 
date_ce_date, interval, date_ce_interval, recurrences) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, OOl|l, start, 
date_ce_date, interval, date_ce_interval, recurrences, options) == FAILURE) {
RETURN_FALSE;
}
 
@@ -3537,8 +3547,9 @@
dpobj = zend_object_store_get_object(getThis() TSRMLS_CC);
dpobj-interval = timelib_rel_time_clone(intobj-diff);
dpobj-start= clone;
-   dpobj-recurrences = recurrences;
dpobj-initialized = 1;
+   dpobj-include_start_date = !(options  
PHP_DATE_PERIOD_EXCLUDE_START_DATE);
+   dpobj-recurrences = recurrences + dpobj-include_start_date;
 
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date php_date.c

2008-05-01 Thread Derick Rethans
derick  Thu May  1 13:31:22 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Include the starting date by default in the iterator output, but add an
option to disable this behavior.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.31r2=1.43.2.45.2.51.2.32diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.31 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.32
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.31 Thu May  1 00:12:24 2008
+++ php-src/ext/date/php_date.c Thu May  1 13:31:22 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.31 2008/05/01 00:12:24 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.32 2008/05/01 13:31:22 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -331,6 +331,7 @@
timelib_rel_time *interval;
int   recurrences;
int   initialized;
+   int   include_start_date;
 };
 
 #define DATE_SET_CONTEXT \
@@ -1570,6 +1571,8 @@
 #define PHP_DATE_TIMEZONE_GROUP_ALL0x07FF
 #define PHP_DATE_TIMEZONE_GROUP_ALL_W_BC   0x0FFF
 
+#define PHP_DATE_PERIOD_EXCLUDE_START_DATE 0x0001
+
 
 /* define an overloaded iterator structure */
 typedef struct {
@@ -1624,18 +1627,20 @@
timelib_time *it_time = object-start;
php_date_obj *newdateobj;
 
-   /* apply modification */
-   it_time-relative.y = object-interval-y;
-   it_time-relative.m = object-interval-m;
-   it_time-relative.d = object-interval-d;
-   it_time-relative.h = object-interval-h;
-   it_time-relative.i = object-interval-i;
-   it_time-relative.s = object-interval-s;
-   it_time-relative.weekday = object-interval-weekday;
-   it_time-have_relative = 1;
-   it_time-sse_uptodate = 0;
-   timelib_update_ts(it_time, NULL);
-   timelib_update_from_sse(it_time);
+   /* apply modification if it's not the first iteration */
+   if (!object-include_start_date || iterator-current_index  0) {
+   it_time-relative.y = object-interval-y;
+   it_time-relative.m = object-interval-m;
+   it_time-relative.d = object-interval-d;
+   it_time-relative.h = object-interval-h;
+   it_time-relative.i = object-interval-i;
+   it_time-relative.s = object-interval-s;
+   it_time-relative.weekday = object-interval-weekday;
+   it_time-have_relative = 1;
+   it_time-sse_uptodate = 0;
+   timelib_update_ts(it_time, NULL);
+   timelib_update_from_sse(it_time);
+   }
 
/* Create new object */
MAKE_STD_ZVAL(iterator-current);
@@ -1789,6 +1794,11 @@
zend_class_implements(date_ce_period TSRMLS_CC, 1, zend_ce_traversable);
memcpy(date_object_handlers_period, zend_get_std_object_handlers(), 
sizeof(zend_object_handlers));
date_object_handlers_period.clone_obj = date_object_clone_period;
+
+#define REGISTER_PERIOD_CLASS_CONST_STRING(const_name, value) \
+   zend_declare_class_constant_long(date_ce_period, const_name, 
sizeof(const_name)-1, value TSRMLS_CC);
+
+   REGISTER_PERIOD_CLASS_CONST_STRING(EXCLUDE_START_DATE, 
PHP_DATE_PERIOD_EXCLUDE_START_DATE);
 }
 
 static inline zend_object_value date_object_new_date_ex(zend_class_entry 
*class_type, php_date_obj **ptr TSRMLS_DC)
@@ -3346,11 +3356,11 @@
php_date_obj *dateobj;
php_interval_obj *intobj;
zval *start, *interval;
-   long  recurrences;
+   long  recurrences, options = 0;
timelib_time *clone;

php_set_error_handling(EH_THROW, NULL TSRMLS_CC);
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, OOl, start, 
date_ce_date, interval, date_ce_interval, recurrences) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, OOl|l, start, 
date_ce_date, interval, date_ce_interval, recurrences, options) == FAILURE) {
RETURN_FALSE;
}
 
@@ -3369,8 +3379,9 @@
dpobj = zend_object_store_get_object(getThis() TSRMLS_CC);
dpobj-interval = timelib_rel_time_clone(intobj-diff);
dpobj-start= clone;
-   dpobj-recurrences = recurrences;
dpobj-initialized = 1;
+   dpobj-include_start_date = !(options  
PHP_DATE_PERIOD_EXCLUDE_START_DATE);
+   dpobj-recurrences = recurrences + dpobj-include_start_date;
 
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date php_date.c /ext/date/lib parse_date.c parse_date.re timelib.c timelib_structs.h tm2unixtime.c

2008-05-01 Thread Derick Rethans
derick  Thu May  1 16:15:58 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date   php_date.c 
/php-src/ext/date/lib   parse_date.c parse_date.re timelib.c 
timelib_structs.h tm2unixtime.c 
  Log:
  - MFH: Rearranged some structures to allow for more powerfull 
period/intervals.
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.32r2=1.43.2.45.2.51.2.33diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.32 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.33
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.32 Thu May  1 13:31:22 2008
+++ php-src/ext/date/php_date.c Thu May  1 16:15:26 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.32 2008/05/01 13:31:22 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.33 2008/05/01 16:15:26 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -2213,7 +2213,7 @@
timelib_fill_holes(dateobj-time, now, 0);
timelib_update_ts(dateobj-time, tzi);
 
-   dateobj-time-have_weekday_relative = dateobj-time-have_relative = 0;
+   dateobj-time-have_relative = 0;
 
if (type == TIMELIB_ZONETYPE_ID  now-tz_info != tzi) {
timelib_tzinfo_dtor(now-tz_info);
@@ -2453,28 +2453,24 @@
break;
}
}
-   if (parsed_time-have_relative || parsed_time-have_weekday_relative || 
parsed_time-have_special_relative || parsed_time-relative.first_last_day_of) {
+   if (parsed_time-have_relative) {
MAKE_STD_ZVAL(element);
array_init(element);
-   }
-   if (parsed_time-have_relative) {
add_assoc_long(element, year,   parsed_time-relative.y);
add_assoc_long(element, month,  parsed_time-relative.m);
add_assoc_long(element, day,parsed_time-relative.d);
add_assoc_long(element, hour,   parsed_time-relative.h);
add_assoc_long(element, minute, parsed_time-relative.i);
add_assoc_long(element, second, parsed_time-relative.s);
-   }
-   if (parsed_time-have_weekday_relative) {
-   add_assoc_long(element, weekday, 
parsed_time-relative.weekday);
-   }
-   if (parsed_time-have_special_relative  (parsed_time-special.type == 
TIMELIB_SPECIAL_WEEKDAY)) {
-   add_assoc_long(element, weekdays, 
parsed_time-special.amount);
-   }
-   if (parsed_time-relative.first_last_day_of) {
-   add_assoc_bool(element, parsed_time-relative.first_last_day_of 
== 1 ? first_day_of_month : last_day_of_month, 1);
-   }
-   if (parsed_time-have_relative || parsed_time-have_weekday_relative || 
parsed_time-have_special_relative || parsed_time-relative.first_last_day_of) {
+   if (parsed_time-relative.have_weekday_relative) {
+   add_assoc_long(element, weekday, 
parsed_time-relative.weekday);
+   }
+   if (parsed_time-relative.have_special_relative  
(parsed_time-relative.special.type == TIMELIB_SPECIAL_WEEKDAY)) {
+   add_assoc_long(element, weekdays, 
parsed_time-relative.special.amount);
+   }
+   if (parsed_time-relative.first_last_day_of) {
+   add_assoc_bool(element, 
parsed_time-relative.first_last_day_of == 1 ? first_day_of_month : 
last_day_of_month, 1);
+   }
add_assoc_zval(return_value, relative, element);
}
timelib_time_dtor(parsed_time);
@@ -2563,7 +2559,7 @@
dateobj-time-relative.s = tmp_time-relative.s;
dateobj-time-relative.weekday = tmp_time-relative.weekday;
dateobj-time-have_relative = tmp_time-have_relative;
-   dateobj-time-have_weekday_relative = tmp_time-have_weekday_relative;
+   dateobj-time-relative.have_weekday_relative = 
tmp_time-relative.have_weekday_relative;
dateobj-time-sse_uptodate = 0;
timelib_time_dtor(tmp_time);
 
@@ -2600,9 +2596,9 @@
dateobj-time-relative.h = intobj-diff-h * bias;
dateobj-time-relative.i = intobj-diff-i * bias;
dateobj-time-relative.s = intobj-diff-s * bias;
-   dateobj-time-relative.weekday = 0;
dateobj-time-have_relative = 1;
-   dateobj-time-have_weekday_relative = 0;
+   dateobj-time-relative.weekday = 0;
+   dateobj-time-relative.have_weekday_relative = 0;
dateobj-time-sse_uptodate = 0;
 
timelib_update_ts(dateobj-time, NULL);
@@ -2638,9 +2634,9 @@
dateobj-time-relative.h = 0 - (intobj-diff-h * bias);
dateobj-time-relative.i = 0 - (intobj-diff-i * bias);
dateobj-time-relative.s = 0 - (intobj-diff-s * bias);
-   dateobj-time-relative.weekday = 0;
dateobj-time-have_relative = 1;
-   

[PHP-CVS] cvs: CVSROOT / avail

2008-05-01 Thread Stanislav Malyshev
stasThu May  1 22:10:00 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  intl docs now in the main tree, grant access to it for pecl/intl team
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1389r2=1.1390diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1389 CVSROOT/avail:1.1390
--- CVSROOT/avail:1.1389Sat Apr 26 23:20:05 2008
+++ CVSROOT/avail   Thu May  1 22:10:00 2008
@@ -277,7 +277,7 @@
 avail|tias|pear/PEAR_Frontend_Web,peardoc
 avail|va|pecl/yami
 avail|msaraujo,mansion|pecl/lua
-avail|merletenney,kirtig,harveyrd,kuntakinte14,ebatutis,tex,vsavchuk|pecl/intl,pecl/unicode
+avail|merletenney,kirtig,harveyrd,kuntakinte14,ebatutis,tex,vsavchuk|pecl/intl,pecl/unicode,phpdoc/en/reference/intl
 avail|lucas|pecl/apd
 avail|rotsenmarcello|pecl/puno
 avail|lwe|pecl/pdo_firebird,php-src/ext/pdo_firebird



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php