[evolvis-commits] r15306: configman.php can now display the configuration from the config API
mirabilos at evolvis.org
mirabilos at evolvis.org
Mon Feb 28 23:54:33 CET 2011
Author: mirabilos
Date: 2011-02-28 23:54:33 +0100 (Mon, 28 Feb 2011)
New Revision: 15306
Modified:
trunk/gforge_base/evolvisforge-5.1/gforge/www/admin/configman.php
Log:
configman.php can now display the configuration from the config API
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/admin/configman.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/admin/configman.php 2011-02-28 22:54:30 UTC (rev 15305)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/admin/configman.php 2011-02-28 22:54:33 UTC (rev 15306)
@@ -277,10 +277,55 @@
?>
</form>
+<hr/>
<?php
+echo "<h2>".sprintf (_('Configuration from the config API (*.ini files) (experimental)'))."</h2>" ;
+$title_arr = array(_('Variable'),_('Configured value'),_('Result (possibly after interpolation)'));
+echo $HTML->listTableTop($title_arr);
+$c = FusionForgeConfig::get_instance () ;
+$counter = 0 ;
+$sections = $c->get_sections () ;
+natsort($sections) ;
+array_unshift ($sections, 'core') ;
+$seen_core = false ;
+foreach ($sections as $section) {
+ if ($section == 'core') {
+ if ($seen_core) {
+ continue ;
+ }
+ $seen_core = true ;
+ }
+ echo '<tr><th colspan="3"><strong>'.sprintf (_('Section %s'), $section)."</th></tr>" ;
+
+ $variables = $c->get_variables ($section) ;
+ natsort($variables) ;
+ foreach ($variables as $var) {
+ echo '<tr '. $HTML->boxGetAltRowStyle($counter++) .'><td>'.$var ;
+ if ($c->is_bool ($section, $var)) {
+ print " (boolean)" ;
+ }
+ print "</td><td>" ;
+ print $c->get_raw_value ($section, $var) ;
+ print "</td><td>" ;
+ $v = $c->get_value ($section, $var) ;
+ if ($c->is_bool ($section, $var)) {
+ if ($v) {
+ print "true" ;
+ } else {
+ print "false" ;
+ }
+ } else {
+ print "$v" ;
+ }
+ print "</td></tr>" ;
+ }
+}
+
+echo $HTML->listTableBottom();
+
site_admin_footer(array());
function get_absolute_filename($filename) {
More information about the evolvis-commits
mailing list