Exemplo n.º 1
0
 private function addDBDefaultSettings(Gpf_File_Settings $setting)
 {
     $setting->setSetting(Gpf_Settings_Gpf::DB_DATABASE, '', false);
     $setting->setSetting(Gpf_Settings_Gpf::DB_HOSTNAME, '', false);
     $setting->setSetting(Gpf_Settings_Gpf::DB_PASSWORD, '', false);
     $setting->setSetting(Gpf_Settings_Gpf::DB_USERNAME, '', false);
 }
 private function writeFileData()
 {
     $accountId = Gpf_Session::getAuthUser()->getAccountId();
     $settings = new Gpf_File_Settings($accountId);
     foreach ($settings->getAll() as $name => $value) {
         $this->file->writeArray(array($name, $value));
     }
 }
Exemplo n.º 3
0
 public function execute() {
     $settingsFile = new Gpf_File_Settings();
     if(!$settingsFile->hasSetting(Pap_Settings::P3P_POLICY_COMPACT)) {
         $settingsFile->setSetting(Pap_Settings::P3P_POLICY_COMPACT, Gpf_Settings::get(Pap_Settings::P3P_POLICY_COMPACT));
     }
     if(!$settingsFile->hasSetting(Pap_Settings::URL_TO_P3P)) {
         $settingsFile->setSetting(Pap_Settings::URL_TO_P3P, Gpf_Settings::get(Pap_Settings::URL_TO_P3P));
     }
 }
Exemplo n.º 4
0
	public function execute() {
		$accountSettings = new Gpf_File_Settings(Gpf_Db_Account::DEFAULT_ACCOUNT_ID);
		$globalSettings = new Gpf_File_Settings();
		$globalSettings->getAll();

		$settingName = Gpf_Settings_Gpf::BENCHMARK_ACTIVE;
		if ($accountSettings->hasSetting($settingName)) {
			$globalSettings->setSetting($settingName, $accountSettings->getSetting($settingName));
			$accountSettings->removeSetting($settingName);
		}		
	}
Exemplo n.º 5
0
 protected function loadFileSetting($name, Gpf_Io_File $file)
 {
     try {
         $this->cache[$name] = $this->file->getSetting($name, $file);
     } catch (Gpf_Settings_UnknownSettingException $e) {
         $this->cache[$name] = $this->defines->getDefaultValue($name);
     }
 }
 private function createSettingsFile()
 {
     $setting = new Gpf_File_Settings($this->account->getId());
     $setting->saveAll();
     @chmod($setting->getSettingFileName(), 0777);
 }
 private function writeFtpInfo($hostname, $directory, $username, $password)
 {
     $settingFile = new Gpf_File_Settings();
     try {
         $settingFile->getAll();
     } catch (Exception $e) {
     }
     $settingFile->setSetting(Gpf_Settings_Gpf::FTP_USERNAME, $username, false);
     $settingFile->setSetting(Gpf_Settings_Gpf::FTP_PASSWORD, $password, false);
     $settingFile->setSetting(Gpf_Settings_Gpf::FTP_HOSTNAME, $hostname, false);
     $settingFile->setSetting(Gpf_Settings_Gpf::FTP_DIRECTORY, $directory, false);
     $settingFile->saveAll();
 }
Exemplo n.º 8
0
 private function changeToGlobalSetting($settingName) {
 	if ($this->accountSettings->hasSetting($settingName)) {
 		$this->globalSettings->setSetting($settingName, $this->accountSettings->getSetting($settingName)); 
 		$this->accountSettings->removeSetting($settingName); 		
 	}
 }
 private function writeDbInfo()
 {
     $settingFile = new Gpf_File_Settings();
     try {
         $settingFile->getAll();
     } catch (Exception $e) {
     }
     $settingFile->setSetting(Gpf_Settings_Gpf::DB_HOSTNAME, $this->hostname, false);
     $settingFile->setSetting(Gpf_Settings_Gpf::DB_USERNAME, $this->username, false);
     $settingFile->setSetting(Gpf_Settings_Gpf::DB_PASSWORD, $this->password, false);
     $settingFile->setSetting(Gpf_Settings_Gpf::DB_DATABASE, $this->dbname, false);
     $settingFile->saveAll();
 }