示例#1
0
 /**
  * Updates system settings.
  */
 public function actionSettings()
 {
     $model = new SettingsForm();
     if (isset($_POST['SettingsForm'])) {
         $model->attributes = $_POST['SettingsForm'];
         if ($model->validate()) {
             $model->save(false);
             Yii::app()->audit->log('Updated settings');
             $this->refresh();
         }
     } else {
         $model->load();
     }
     $this->render('settings', array('model' => $model));
 }