cvs: php4(PHP_4_3) /pear System.php /pear/PEAR Config.php

From: Date: Sun, 22 Dec 2002 01:43:20 +0000
Subject: cvs: php4(PHP_4_3) /pear System.php /pear/PEAR Config.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-7946@lists.php.net to get a copy of this message
ssb Sat Dec 21 20:43:20 2002 EDT Modified files: (Branch: PHP_4_3) /php4/pear System.php /php4/pear/PEAR Config.php Log: MFH Index: php4/pear/System.php diff -u php4/pear/System.php:1.21.2.1 php4/pear/System.php:1.21.2.2 --- php4/pear/System.php:1.21.2.1 Thu Dec 12 21:14:22 2002 +++ php4/pear/System.php Sat Dec 21 20:43:19 2002 @@ -16,7 +16,7 @@ // | Authors: Tomas V.V.Cox <cox@idecnet.com> | // +----------------------------------------------------------------------+ // -// $Id: System.php,v 1.21.2.1 2002/12/13 02:14:22 ssb Exp $ +// $Id: System.php,v 1.21.2.2 2002/12/22 01:43:19 ssb Exp $ // require_once 'PEAR.php'; @@ -43,7 +43,7 @@ * * @package System * @author Tomas V.V.Cox <cox@idecnet.com> -* @version $Revision: 1.21.2.1 $ +* @version $Revision: 1.21.2.2 $ * @access public * @see http://pear.php.net/manual/ */ @@ -419,17 +419,25 @@ */ function which($program, $fallback = false) { + // is_executable() is not available on windows + if (OS_WINDOWS) { + $pear_is_executable = 'is_file'; + } else { + $pear_is_executable = 'is_executable'; + } + // full path given if (basename($program) != $program) { - return (@is_executable($program)) ? $program : $fallback; + return (@$pear_is_executable($program)) ? $program : $fallback; } + // XXX FIXME honor safe mode $path_delim = OS_WINDOWS ? ';' : ':'; $exe_suffix = OS_WINDOWS ? '.exe' : ''; $path_elements = explode($path_delim, getenv('PATH')); foreach ($path_elements as $dir) { $file = $dir . DIRECTORY_SEPARATOR . $program . $exe_suffix; - if (@is_file($file) && @is_executable($file)) { + if (@is_file($file) && @$pear_is_executable($file)) { return $file; } } Index: php4/pear/PEAR/Config.php diff -u php4/pear/PEAR/Config.php:1.35.2.1 php4/pear/PEAR/Config.php:1.35.2.2 --- php4/pear/PEAR/Config.php:1.35.2.1 Thu Dec 12 21:14:23 2002 +++ php4/pear/PEAR/Config.php Sat Dec 21 20:43:20 2002 @@ -16,7 +16,7 @@ // | Author: Stig Bakken <ssb@fast.no> | // +----------------------------------------------------------------------+ // -// $Id: Config.php,v 1.35.2.1 2002/12/13 02:14:23 ssb Exp $ +// $Id: Config.php,v 1.35.2.2 2002/12/22 01:43:20 ssb Exp $ require_once 'PEAR.php'; require_once 'System.php'; @@ -149,7 +149,7 @@ if (isset($_ENV['PHP_PEAR_CACHE_TTL'])) { define('PEAR_CONFIG_DEFAULT_CACHE_TTL', $_ENV['PHP_PEAR_CACHE_TTL']); } else { - define('PEAR_CONFIG_DEFAULT_CACHE_TTL', 0); + define('PEAR_CONFIG_DEFAULT_CACHE_TTL', 3600); } // Default for sig_type @@ -1136,4 +1136,4 @@ // }}} } -?> \ No newline at end of file +?>

« previous php.pear.cvs (#7946) next »