From 2239dd733426146ff313bb03fb79539097cb8a83 Mon Sep 17 00:00:00 2001 From: Revin Roman Date: Thu, 6 Jun 2013 23:13:54 +0400 Subject: [PATCH] Fix new method name "getIsAjax" and fix web application class name in logger --- framework/yii/logging/ProfileTarget.php | 2 +- framework/yii/web/Response.php | 2 +- framework/yii/web/User.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/yii/logging/ProfileTarget.php b/framework/yii/logging/ProfileTarget.php index f4522ac..be1d73d 100644 --- a/framework/yii/logging/ProfileTarget.php +++ b/framework/yii/logging/ProfileTarget.php @@ -70,7 +70,7 @@ class CProfileLogRoute extends CWebLogRoute public function processLogs($logs) { $app = \Yii::$app; - if (!($app instanceof CWebApplication) || $app->getRequest()->getIsAjaxRequest()) + if (!($app instanceof \yii\web\Application) || $app->getRequest()->getIsAjax()) return; if ($this->getReport() === 'summary') diff --git a/framework/yii/web/Response.php b/framework/yii/web/Response.php index 6801191..a8cdee7 100644 --- a/framework/yii/web/Response.php +++ b/framework/yii/web/Response.php @@ -258,7 +258,7 @@ class Response extends \yii\base\Response if (strpos($url, '/') === 0 && strpos($url, '//') !== 0) { $url = Yii::$app->getRequest()->getHostInfo() . $url; } - if (Yii::$app->getRequest()->getIsAjaxRequest()) { + if (Yii::$app->getRequest()->getIsAjax()) { $statusCode = $this->ajaxRedirectCode; } header('Location: ' . $url, true, $statusCode); diff --git a/framework/yii/web/User.php b/framework/yii/web/User.php index 79665ae..5522bbb 100644 --- a/framework/yii/web/User.php +++ b/framework/yii/web/User.php @@ -280,7 +280,7 @@ class User extends Component public function loginRequired() { $request = Yii::$app->getRequest(); - if (!$request->getIsAjaxRequest()) { + if (!$request->getIsAjax()) { $this->setReturnUrl($request->getUrl()); } if ($this->loginUrl !== null) {