From: Reini U. <ru...@us...> - 2004-05-08 11:25:27
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9472 Modified Files: stdlib.php config.php Log Message: php-4.0.4 fixes Index: stdlib.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/stdlib.php,v retrieving revision 1.175 retrieving revision 1.176 diff -u -2 -b -p -d -r1.175 -r1.176 --- stdlib.php 6 May 2004 17:30:38 -0000 1.175 +++ stdlib.php 8 May 2004 11:25:15 -0000 1.176 @@ -1360,14 +1360,4 @@ class Alert { } -/** - * Returns true if current php version is at mimimum a.b.c - * Called: check_php_version(4,1) - */ -function check_php_version ($a = '0', $b = '0', $c = '0') { - global $PHP_VERSION; - if(!isset($PHP_VERSION)) - $PHP_VERSION = substr( str_pad( preg_replace('/\D/','', PHP_VERSION), 3, '0'), 0, 3); - return $PHP_VERSION >= ($a.$b.$c); -} // 1.3.8 => 1030.08 // 1.3.9-p1 => 1030.091 @@ -1405,4 +1395,7 @@ function obj2hash ($obj, $exclude = fals // $Log$ +// Revision 1.176 2004/05/08 11:25:15 rurban +// php-4.0.4 fixes +// // Revision 1.175 2004/05/06 17:30:38 rurban // CategoryGroup: oops, dos2unix eol Index: config.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/config.php,v retrieving revision 1.107 retrieving revision 1.108 diff -u -2 -b -p -d -r1.107 -r1.108 --- config.php 6 May 2004 17:30:38 -0000 1.107 +++ config.php 8 May 2004 11:25:16 -0000 1.108 @@ -7,8 +7,24 @@ rcs_id('$Id$'); */ +/** + * Returns true if current php version is at mimimum a.b.c + * Called: check_php_version(4,1) + */ +function check_php_version ($a = '0', $b = '0', $c = '0') { + global $PHP_VERSION; + if(!isset($PHP_VERSION)) + $PHP_VERSION = substr( str_pad( preg_replace('/\D/','', PHP_VERSION), 3, '0'), 0, 3); + return $PHP_VERSION >= ($a.$b.$c); +} + if (!defined("LC_ALL")) { // Backward compatibility (for PHP < 4.0.5) + if (!check_php_version(4,0,5)) { + define("LC_ALL", "LC_ALL"); + define("LC_CTYPE", "LC_CTYPE"); + } else { define("LC_ALL", 0); define("LC_CTYPE", 2); + } } @@ -298,5 +314,15 @@ if (!function_exists('array_key_exists') } +// => php-4.0.5 +if (!function_exists('is_scalar')) { // lib/stdlib.php:hash() + function is_scalar($x) { + return is_numeric($x) or is_string($x) or is_float($x) or is_bool($x); + } +} + // $Log$ +// Revision 1.108 2004/05/08 11:25:16 rurban +// php-4.0.4 fixes +// // Revision 1.107 2004/05/06 17:30:38 rurban // CategoryGroup: oops, dos2unix eol |