public function init() { parent::init(); if (!Yii::app()->request->isAjaxRequest) { $this->jsonOutPut(0, Yii::t('default', 'forbiddenaction')); } }
public function init() { parent::init(); $this->WB_AKEY = zmf::config('weibo_app_id'); $this->WB_SKEY = zmf::config('weibo_app_key'); $this->WB_CALLBACK_URL = zmf::config('weibo_app_callback'); if (!$this->WB_AKEY || !$this->WB_SKEY || !$this->WB_CALLBACK_URL) { throw new CHttpException(403, '暂未开放'); } $this->weiboService = new SinaWeibo($this->WB_AKEY, $this->WB_SKEY); }
public function init() { parent::init(); }