コード例 #1
0
 /**
  *
  * Updates the config file
  *
  * @return bool
  */
 private function _updateConfig()
 {
     $config = new Digitalus_Installer_Config(false, 'v19');
     $config->loadFile();
     $data = $config->get();
     $data->production->constants->version = self::VERSION_NEW;
     $data->production->language->path = './application/admin/data/languages';
     $data->production->filepath->icons = 'images/icons/silk';
     $config->set($data);
     if ($config->save(self::getConfigPath())) {
         return true;
     }
     return false;
 }
コード例 #2
0
ファイル: Installer.php プロジェクト: laiello/digitalus-cms
 public function loadConfig($default = false, $mode = null, $verbose = false)
 {
     // Load config
     $config = new Digitalus_Installer_Config($default, $mode);
     $this->_setPathToConfig($config->getPathToConfig());
     $configError = false;
     if (!$config->isReadable()) {
         if (true == (bool) $verbose) {
             $this->addError('Could not load config file (' . $this->getPathToConfig() . ')');
         }
         $configError = true;
     }
     if (!$config->isWritable()) {
         if (true == (bool) $verbose) {
             $this->addError('Could not write to config file (' . $this->getPathToConfig() . ')');
         }
         $configError = true;
     }
     if (!$configError && $config->loadFile()) {
         if (true == (bool) $verbose) {
             $this->addMessage('Successfully loaded and tested site configuration');
         }
     } else {
         if (true == (bool) $verbose) {
             $this->addError('Site configuration could not be loaded');
         }
     }
     return $config;
 }