Browse Source

Fixes #648: EVENT_BEFORE_ACTION is triggered twice.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
f1ba923e91
  1. 2
      framework/yii/base/Controller.php

2
framework/yii/base/Controller.php

@ -115,7 +115,7 @@ class Controller extends Component
$this->action = $action;
$result = null;
$event = new ActionEvent($action);
$this->trigger(Application::EVENT_BEFORE_ACTION, $event);
Yii::$app->trigger(Application::EVENT_BEFORE_ACTION, $event);
if ($event->isValid && $this->module->beforeAction($action) && $this->beforeAction($action)) {
$result = $action->runWithParams($params);
$this->afterAction($action, $result);

Loading…
Cancel
Save