示例#1
0
 public function afterValidate()
 {
     if ($this->scenario == 'database' && $this->hasErrors()) {
         $this->saveDBCheckStatusConfig(0);
     }
     $this->getAvailableStep();
     $this->writeToMysqlParamsFile();
     return parent::afterValidate();
 }
示例#2
0
 public function init()
 {
     parent::init();
     $this->createDefaultFiles();
     $values = $this->getConfigFile('db_long_params');
     $this->user = $values['username'];
     $this->password = $values['password'];
     $this->host = $values['host'];
     $this->dbname = $values['dbname'];
     $this->port = $values['port'];
     $this->scenario = 'DBSYNC';
     $values = $this->getConfigFile('database_long_sync_config');
     $this->sync_id = $values['sync_id'];
     $this->sync_periodicity = $values['periodicity'];
     $this->sync_interval = $values['interval'];
     $this->sync_startTime = $values['startTime'];
     $this->sync_delete_periodicity = $values['delete_periodicity'];
     $this->sync_delete_period = $values['delete_period'];
     $this->sync_max_row = $values['max_row'];
     $values = $this->getConfigFile('install_db_long');
     $this->status = $values['install_database_long_status'];
 }