cvs: php4 /pear System.php
| From: | Pierre-Alain Joye | Date: | Mon, 26 Aug 2002 00:18:00 +0000 |
| Subject: | cvs: php4 /pear System.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-5969@lists.php.net to get a copy of this message | ||
pajoye Sun Aug 25 20:18:00 2002 EDT
Modified files:
/php4/pear System.php
Log:
Rule 1: Never quickly fix a thing in cvs
Rule 2: follow rule 1
Thx rasmus :)
Index: php4/pear/System.php
diff -u php4/pear/System.php:1.18 php4/pear/System.php:1.19
--- php4/pear/System.php:1.18 Sun Aug 25 14:11:24 2002
+++ php4/pear/System.php Sun Aug 25 20:18:00 2002
@@ -16,7 +16,7 @@
// | Authors: Tomas V.V.Cox <cox@idecnet.com> |
// +----------------------------------------------------------------------+
//
-// $Id: System.php,v 1.18 2002/08/25 18:11:24 pajoye Exp $
+// $Id: System.php,v 1.19 2002/08/26 00:18:00 pajoye Exp $
//
require_once 'PEAR.php';
@@ -43,7 +43,7 @@
*
* @package System
* @author Tomas V.V.Cox <cox@idecnet.com>
-* @version $Revision: 1.18 $
+* @version $Revision: 1.19 $
* @access public
* @see http://pear.php.net/manual/
*/
@@ -389,22 +389,22 @@
* @return string The temporal directory on the system
*/
function tmpdir()
- {
+ {
if (OS_WINDOWS) {
- if (getenv('TEMP')) {
- return getenv('TEMP');
+ if (($var=$_ENV['TEMP']) || $var=getenv('TEMP')) {
+ return $var;
}
- if (getenv('TMP')) {
- return getenv('TMP');
+ if (($var=$_ENV['TMP']) || $var=getenv('TMP')) {
+ return $var;
}
- if (getenv('windir')) {
- return getenv('windir') . '\temp';
+ if (($var=$_ENV['windir']) || $var=getenv('windir')) {
+ return $var;
}
return getenv('SystemRoot') . '\temp';
}
- if (getenv('TMPDIR')) {
- return getenv('TMPDIR');
- }
+ if (($var=$_ENV['TMPDIR']) || $var=getenv('TMPDIR')) {
+ return $var;
+ }
return '/tmp';
}