cvs: phd / config.php
| From: | Hannes Magnusson | Date: | Mon, 05 Nov 2007 09:49:45 +0000 |
| Subject: | cvs: phd / config.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-342@lists.php.net to get a copy of this message | ||
bjori Mon Nov 5 09:49:45 2007 UTC
Modified files:
/phd config.php
Log:
Added support for the VERBOSE_* constants as arguments
# You can | them together - but you obviously need to escape | from your shell :)
http://cvs.php.net/viewvc.cgi/phd/config.php?r1=1.9&r2=1.10&diff_format=u
Index: phd/config.php
diff -u phd/config.php:1.9 phd/config.php:1.10
--- phd/config.php:1.9 Mon Nov 5 08:41:04 2007
+++ phd/config.php Mon Nov 5 09:49:45 2007
@@ -1,5 +1,5 @@
<?php
-/* $Id: config.php,v 1.9 2007/11/05 08:41:04 bjori Exp $ */
+/* $Id: config.php,v 1.10 2007/11/05 09:49:45 bjori Exp $ */
function v($msg) {
$args = func_get_args();
@@ -159,12 +159,16 @@
/* {{{ Verbosity level */
case "verbose":
- if (is_array($v)) {
- foreach($v as $i => $val) {
- $verbose |= (int)$val;
+ foreach((array)$v as $i => $val) {
+ foreach(explode("|", $val) as $const) {
+ if (defined($const)) {
+ $verbose |= (int)constant($const);
+ } elseif (is_numeric($const)) {
+ $verbose |= (int)$const;
+ } else {
+ v("Unkown option passed to --$k, $const\n");
+ }
}
- } else {
- $verbose |= (int)$v;
}
$OPTIONS["verbose"] = $verbose;
break;