Source for file settings.php

Documentation is available at settings.php

  1. <?php
  2. /**
  3. * Change the system settings
  4. *
  5. @author     Stuart Prescott
  6. @copyright  Copyright Stuart Prescott
  7. @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  8. @version    $Id: settings.php,v 1.3 2007/02/05 23:36:50 themill Exp $
  9. @package    Bumblebee
  10. @subpackage Actions
  11. *
  12. *  path (bumblebee root)/inc/actions/settings.php
  13. */
  14.  
  15. /** Load ancillary functions */
  16. require_once 'inc/typeinfo.php';
  17.  
  18. /** Settings object */
  19. require_once 'inc/bb/settings.php';
  20.  
  21. /**
  22. * Change the system settings
  23. @package    Bumblebee
  24. @subpackage Actions
  25. */
  26. class ActionSettings extends ActionAction {
  27.  
  28.   /**
  29.   * Initialising the class
  30.   *
  31.   * @param  BumblebeeAuth $auth  Authorisation object
  32.   * @param  array $pdata   extra state data from the call path
  33.   * @return void nothing
  34.   */
  35.   function ActionSettings($auth$pdata{
  36.     parent::ActionAction($auth$pdata);
  37.     $this->mungeInputData();
  38.   }
  39.  
  40.   function go({
  41.     if ($this->readOnly$this->_dataCleanse(null);
  42.     $this->edit();
  43.   }
  44.  
  45.   /**
  46.   * Display the current config and accept changes
  47.   */
  48.   function edit({
  49.     $set new Settings();
  50.     $set->update($this->PD);
  51.     $set->checkValid();
  52.     echo $this->reportAction($set->sync(),
  53.           array(
  54.               STATUS_OK =>   T_('Settings updated'),
  55.               STATUS_ERR =>  T_('Settings could not be changed:').' '.$set->errorMessage
  56.           )
  57.         );
  58.     echo $set->display();
  59.     $submit T_('Update configuration');
  60.     echo "<input type='submitname='submitvalue='$submit' />";
  61.   }
  62.  
  63.  
  64. }
  65.  
  66. ?>

Documentation generated on Tue, 06 Mar 2007 10:01:56 +0000 by phpDocumentor 1.3.0