Commit 2239dd73 by Revin Roman

Fix new method name "getIsAjax" and fix web application class name in logger

parent bade6f7e
......@@ -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')
......
......@@ -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);
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment