svn: /phd/trunk/ package.xml phpdotnet/phd/Config.php
| From: | Richard Quadling | Date: | Fri, 04 Feb 2011 13:58:12 +0000 |
| Subject: | svn: /phd/trunk/ package.xml phpdotnet/phd/Config.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-7712@lists.php.net to get a copy of this message | ||
rquadling Fri, 04 Feb 2011 13:58:12 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=308021
Log:
Using saveconfig once no longer saves the config on every call to render.
Changed paths:
U phd/trunk/package.xml
U phd/trunk/phpdotnet/phd/Config.php
Modified: phd/trunk/package.xml
===================================================================
--- phd/trunk/package.xml 2011-02-04 11:51:29 UTC (rev 308020)
+++ phd/trunk/package.xml 2011-02-04 13:58:12 UTC (rev 308021)
@@ -67,6 +67,7 @@
<notes>
Added support for package cli options (Moacir)
Do not disable color configuration settings when loading from phd.config.php on Windows when
saved setting is enabled (Richard Quadling)
+ Using saveconfig once no longer saves the config on every call to render (Richard Quadling)
</notes>
<contents>
Modified: phd/trunk/phpdotnet/phd/Config.php
===================================================================
--- phd/trunk/phpdotnet/phd/Config.php 2011-02-04 11:51:29 UTC (rev 308020)
+++ phd/trunk/phpdotnet/phd/Config.php 2011-02-04 13:58:12 UTC (rev 308021)
@@ -24,7 +24,7 @@
'lang_dir' => './',
'language' => 'en',
'fallback_language' => 'en',
- 'verbose' => VERBOSE_DEFAULT,
+ 'verbose' => VERBOSE_ALL,
'date_format' => 'H:i:s',
'render_ids' => array(
),
@@ -57,7 +57,7 @@
public static function init(array $a) {
// Override any defaults due to operating system constraints
// and copy defaults to working optionArray
- if (is_null(self::$optionArray)) {
+ if ($newInit = is_null(self::$optionArray)) {
// By default, Windows does not support colors on the console.
// ANSICON by Jason Hood can be used to provide colors at the console.
@@ -79,6 +79,13 @@
// now merge other options
self::$optionArray = array_merge(self::$optionArray, (array)$a);
+
+ // Always set saveconfig to false for a new initialization, even after restoring
+ // a save configuration. This allows additional options to be added at the
+ // command line without them being automatically saved.
+ if ($newInit) {
+ self::$optionArrayDefault['saveconfig'] = false;
+ }
}
public static function getAllFiltered() {