cvs: pear-core(PEAR_1_4) /PEAR Config.php

From: Date: Fri, 16 Jun 2006 11:51:51 +0000
Subject: cvs: pear-core(PEAR_1_4) /PEAR Config.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-4817@lists.php.net to get a copy of this message
pajoye Fri Jun 16 11:51:51 2006 UTC Modified files: (Branch: PEAR_1_4) /pear-core/PEAR Config.php Log: - MFH: add temp_dir and download_dir http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Config.php?r1=1.124&r2=1.124.2.1&diff_format=u Index: pear-core/PEAR/Config.php diff -u pear-core/PEAR/Config.php:1.124 pear-core/PEAR/Config.php:1.124.2.1 --- pear-core/PEAR/Config.php:1.124 Thu Mar 2 18:14:12 2006 +++ pear-core/PEAR/Config.php Fri Jun 16 11:51:51 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.124 2006/03/02 18:14:12 cellog Exp $ + * @version CVS: $Id: Config.php,v 1.124.2.1 2006/06/16 11:51:51 pajoye Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -138,6 +138,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')); @@ -147,6 +156,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')); @@ -412,6 +430,20 @@ 'prompt' => 'PEAR Installer cache directory', 'group' => 'File Locations (Advanced)', ), + 'temp_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_TEMP_DIR, + 'doc' => 'directory which is used for all temp files', + 'prompt' => 'PEAR Installer temp 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 (#4817) next »