[Fusionforge-commits] r9068 - trunk/gforge/common/include
Roland Mas
lolando at libremir.placard.fr.eu.org
Mon Mar 15 14:03:57 CET 2010
Author: lolando
Date: 2010-03-15 14:03:57 +0100 (Mon, 15 Mar 2010)
New Revision: 9068
Modified:
trunk/gforge/common/include/config.php
Log:
New method to get several config items at once
Modified: trunk/gforge/common/include/config.php
===================================================================
--- trunk/gforge/common/include/config.php 2010-03-15 13:03:46 UTC (rev 9067)
+++ trunk/gforge/common/include/config.php 2010-03-15 13:03:57 UTC (rev 9068)
@@ -77,6 +77,24 @@
return $c->get_value ($section, $var) ;
}
+function fusionforge_get_config_array ($arr) {
+ $c = FusionForgeConfig::get_instance () ;
+
+ $ret = array () ;
+
+ foreach ($arr as $item) {
+ $var = $arr[0] ;
+ if (isset ($arr[1])) {
+ $section = $arr[1] ;
+ } else {
+ $section = 'core' ;
+ }
+ $ret[] = $c->get_value ($section, $var) ;
+ }
+
+ return $ret ;
+}
+
function fusionforge_define_config_item ($var, $section, $default) {
$c = FusionForgeConfig::get_instance () ;
More information about the Fusionforge-commits
mailing list