Example #1
0
 public function actionSetDefault()
 {
     if (demo()) {
         throw new CException(tc('Sorry, this action is not allowed on the demo server.'));
     }
     $id = (int) Yii::app()->request->getPost('id');
     $model = Themes::model()->findByPk($id);
     $model->setDefault();
     // delete assets js cache
     ConfigurationModel::clearGenerateJSAssets();
     Yii::app()->end();
 }