/** * @access private * @return string */ function _SavePage() { // Load the main-preferences file $this->_Preferences->Load('system/settings.php'); // Load the preferences files of the modules (if there are some) // get the activated modules $modulesActivated = unserialize($this->_Config->Get('modules_activated')); // some data aviailable? if (is_array($modulesActivated)) { if (count($modulesActivated) >= 0) { foreach ($modulesActivated as $moduleName) { $settingsFile = "modules/{$moduleName}/{$moduleName}_settings.php"; if (file_exists($settingsFile)) { // Load the config file of this module $this->_Preferences->Load($settingsFile); } } } } if (count($this->_Preferences->Settings) <= 0) { return $this->GetPage(''); } // Go through all preferences entries foreach ($this->_Preferences->Settings as $settings) { foreach ($settings as $setting) { $settingValue = GetPostOrGet('setting_' . $setting['name']); //TODO : value-type-check!! if (!empty($settingValue) || is_numeric($settingValue) && $settingValue == 0 || $setting['datatype'] == 'string0') { $currentValue = $this->_Config->Get($setting['name']); // Check if something has changed if ($currentValue != $settingValue) { // TODO: check the data before saving $this->_Config->Save($setting['name'], $settingValue); } } } } // Show the 'main-view' return $this->GetPage(''); }