[geeklog-cvs] Geeklog-1.x/public_html/admin configuration.php, 1.2, 1.3

Aaron Blankstein ablankstein at qs1489.pair.com
Sat Dec 29 19:11:42 EST 2007


Update of /cvsroot/geeklog/Geeklog-1.x/public_html/admin
In directory qs1489.pair.com:/tmp/cvs-serv59652/Geeklog-1.x/public_html/admin

Modified Files:
	configuration.php 
Log Message:
Updated config class to run more smoothly with PHP4.
Changed config class's plugin support.
Added barebones handling of static page's config options in the config class.



Index: configuration.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/admin/configuration.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** configuration.php	23 Sep 2007 08:28:39 -0000	1.2
--- configuration.php	30 Dec 2007 00:11:40 -0000	1.3
***************
*** 35,47 ****
  require_once 'auth.inc.php';
  
! $config = config::create(array_key_exists('conf_group', $_POST) ? 
!                          $_POST['conf_group'] : 'Core');
  
  if (array_key_exists('set_action', $_POST)){
      if (SEC_inGroup('Root')) {
          if ($_POST['set_action'] == 'restore') {
!             $config->restore_param($_POST['name']);
          } elseif ($_POST['set_action'] == 'unset') {
!             $config->unset_param($_POST['name']);
          }
      }
--- 35,48 ----
  require_once 'auth.inc.php';
  
! $conf_group = array_key_exists('conf_group', $_POST) ? $_POST['conf_group'] : 'Core';
! 
! $config =& config::get_instance();
  
  if (array_key_exists('set_action', $_POST)){
      if (SEC_inGroup('Root')) {
          if ($_POST['set_action'] == 'restore') {
!             $config->restore_param($_POST['name'], $conf_group);
          } elseif ($_POST['set_action'] == 'unset') {
!             $config->unset_param($_POST['name'], $conf_group);
          }
      }
***************
*** 51,59 ****
      $result = null;
      if (! array_key_exists('form_reset', $_POST)) {
!         $result = $config->updateConfig($_POST);
      }
!     echo $config->get_ui($_POST['sub_group'], $result);
  } else {
!     echo $config->get_ui(array_key_exists('subgroup', $_POST) ?
                           $_POST['subgroup'] : null);
  }
--- 52,60 ----
      $result = null;
      if (! array_key_exists('form_reset', $_POST)) {
!         $result = $config->updateConfig($_POST, $conf_group);
      }
!     echo $config->get_ui($conf_group, $_POST['sub_group'], $result);
  } else {
!     echo $config->get_ui($conf_group, array_key_exists('subgroup', $_POST) ?
                           $_POST['subgroup'] : null);
  }




More information about the geeklog-cvs mailing list