cvs: php-src(PHP_4_4) /pear/PEAR Config.php

From: Date: Thu, 03 Nov 2005 05:26:14 +0000
Subject: cvs: php-src(PHP_4_4) /pear/PEAR Config.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-34975@lists.php.net to get a copy of this message
cellog Thu Nov 3 00:26:14 2005 EDT Modified files: (Branch: PHP_4_4) /php-src/pear/PEAR Config.php Log: merge changes from pear-core http://cvs.php.net/diff.php/php-src/pear/PEAR/Config.php?r1=1.35.2.17.2.1&r2=1.35.2.17.2.2&ty=u Index: php-src/pear/PEAR/Config.php diff -u php-src/pear/PEAR/Config.php:1.35.2.17.2.1 php-src/pear/PEAR/Config.php:1.35.2.17.2.2 --- php-src/pear/PEAR/Config.php:1.35.2.17.2.1 Wed Nov 2 11:57:20 2005 +++ php-src/pear/PEAR/Config.php Thu Nov 3 00:26:08 2005 @@ -16,7 +16,7 @@ * @author Greg Beaver <cellog@php.net> * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Config.php,v 1.35.2.17.2.1 2005/11/02 16:57:20 cellog Exp $ + * @version CVS: $Id: Config.php,v 1.35.2.17.2.2 2005/11/03 05:26:08 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -1037,6 +1037,36 @@ if (!isset($var['default'])) { return $this->raiseError( 'Configuration information must contain a default value ("default" index)'); + } else { + if (is_array($var['default'])) { + $real_default = ''; + foreach ($var['default'] as $config_var => $val) { + if (strpos($config_var, 'text') === 0) { + $real_default .= $val; + } elseif (strpos($config_var, 'constant') === 0) { + if (defined($val)) { + $real_default .= constant($val); + } else { + return $this->raiseError( + 'Unknown constant "' . $val . '" requested in ' . + 'default value for configuration variable "' . + $name . '"'); + } + } elseif (isset($this->configuration_info[$config_var])) { + $real_default .= + $this->configuration_info[$config_var]['default']; + } else { + return $this->raiseError( + 'Unknown request for "' . $config_var . '" value in ' . + 'default value for configuration variable "' . + $name . '"'); + } + } + $var['default'] = $real_default; + } + if ($var['type'] == 'integer') { + $var['default'] = (integer) $var['default']; + } } if (!isset($var['doc'])) { return $this->raiseError( @@ -1058,6 +1088,7 @@ } return true; } + // {{{ _encodeOutput(&data) /**

« previous php.cvs (#34975) next »