...
|
...
|
@@ -85,7 +85,7 @@ class BaseController extends Controller |
|
|
*/
|
|
|
public function redirect($url, $statusCode = 302)
|
|
|
{
|
|
|
$url = (strpos($url,'http') === 0) ? $url : Yii::getAlias('@web/'.$url);
|
|
|
$url = (strpos($url,'http') === 0) ? $url : ltrim(Yii::getAlias('@web/'.$url),'/');
|
|
|
return Yii::$app->getResponse()->redirect($url, $statusCode);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -97,7 +97,7 @@ class BaseController extends Controller |
|
|
public function goBack($defaultUrl = null)
|
|
|
{
|
|
|
$url = Yii::$app->getUser()->getReturnUrl($defaultUrl);
|
|
|
$url = (strpos($url,'http') === 0) ? $url : Yii::getAlias('@web/'.$url);
|
|
|
$url = (strpos($url,'http') === 0) ? $url : ltrim(Yii::getAlias('@web/'.$url),'/');
|
|
|
return Yii::$app->getResponse()->redirect($url);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -108,7 +108,8 @@ class BaseController extends Controller |
|
|
*/
|
|
|
public function refresh($anchor = '')
|
|
|
{
|
|
|
return Yii::$app->getResponse()->redirect(Yii::getAlias('@web/'.Yii::$app->getRequest()->getUrl()) . $anchor);
|
|
|
$url = ltrim(Yii::getAlias('@web/'.Yii::$app->getRequest()->getUrl()),'/') . $anchor;
|
|
|
return Yii::$app->getResponse()->redirect($url);
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|