浏览代码

Changed existing code to match the changes regarding response

Carsten Brandt 12 年之前
父节点
当前提交
452bd8e5e3
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      controllers/SiteController.php

+ 3 - 3
controllers/SiteController.php

@@ -27,7 +27,7 @@ class SiteController extends Controller
 	{
 		$model = new LoginForm();
 		if ($this->populate($_POST, $model) && $model->login()) {
-			return Yii::$app->response->redirect(array('site/index'));
+			return $this->response->redirect(array('site/index'));
 		} else {
 			return $this->render('login', array(
 				'model' => $model,
@@ -38,7 +38,7 @@ class SiteController extends Controller
 	public function actionLogout()
 	{
 		Yii::$app->user->logout();
-		return Yii::$app->response->redirect(array('site/index'));
+		return $this->response->redirect(array('site/index'));
 	}
 
 	public function actionContact()
@@ -46,7 +46,7 @@ class SiteController extends Controller
 		$model = new ContactForm;
 		if ($this->populate($_POST, $model) && $model->contact(Yii::$app->params['adminEmail'])) {
 			Yii::$app->session->setFlash('contactFormSubmitted');
-			return Yii::$app->response->refresh();
+			return $this->response->refresh();
 		} else {
 			return $this->render('contact', array(
 				'model' => $model,