cvs: pear-core /PEAR Config.php

From: Date: Fri, 09 Jun 2006 00:22:33 +0000
Subject: cvs: pear-core /PEAR Config.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-4785@lists.php.net to get a copy of this message
pajoye Fri Jun 9 00:22:33 2006 UTC Modified files: /pear-core/PEAR Config.php Log: - add temp_dir config option, allow to define a custom temp dir (prevents weird things to happen if we have to detect it) - add download_dir (was already "used" but never implemented) http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Config.php?r1=1.129&r2=1.130&diff_format=u Index: pear-core/PEAR/Config.php diff -u pear-core/PEAR/Config.php:1.129 pear-core/PEAR/Config.php:1.130 --- pear-core/PEAR/Config.php:1.129 Fri May 12 02:38:58 2006 +++ pear-core/PEAR/Config.php Fri Jun 9 00:22:33 2006 @@ -16,7 +16,7 @@ * @author Greg Beaver <cellog@php.net> * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Config.php,v 1.129 2006/05/12 02:38:58 cellog Exp $ + * @version CVS: $Id: Config.php,v 1.130 2006/06/09 00:22:33 pajoye Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -139,6 +139,15 @@ $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'tests'); } +// Default for temp_dir +if (getenv('PHP_PEAR_TEMP_DIR')) { + define('PEAR_CONFIG_DEFAULT_TEMP_DIR', getenv('PHP_PEAR_TEMP_DIR')); +} else { + define('PEAR_CONFIG_DEFAULT_TEMP_DIR', + System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' . + DIRECTORY_SEPARATOR . 'temp'); +} + // Default for cache_dir if (getenv('PHP_PEAR_CACHE_DIR')) { define('PEAR_CONFIG_DEFAULT_CACHE_DIR', getenv('PHP_PEAR_CACHE_DIR')); @@ -148,6 +157,15 @@ DIRECTORY_SEPARATOR . 'cache'); } +// Default for download_dir +if (getenv('PHP_PEAR_DOWNLOAD_DIR')) { + define('PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR', getenv('PHP_PEAR_DOWNLOAD_DIR')); +} else { + define('PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR', + System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' . + DIRECTORY_SEPARATOR . 'download'); +} + // Default for php_bin if (getenv('PHP_PEAR_PHP_BIN')) { define('PEAR_CONFIG_DEFAULT_PHP_BIN', getenv('PHP_PEAR_PHP_BIN')); @@ -413,6 +431,13 @@ 'prompt' => 'PEAR Installer cache directory', 'group' => 'File Locations (Advanced)', ), + 'download_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_CACHE_DIR, + 'doc' => 'directory which is used for XMLRPC cache', + 'prompt' => 'PEAR Installer cache directory', + 'group' => 'File Locations (Advanced)', + ), 'php_bin' => array( 'type' => 'file', 'default' => PEAR_CONFIG_DEFAULT_PHP_BIN,

« previous php.pear.core (#4785) next »