...
|
...
|
@@ -85,7 +85,7 @@ class BaseController extends Controller |
|
|
*/
|
|
|
public function redirect($url, $statusCode = 302)
|
|
|
{
|
|
|
$url = (strpos($url,'http') === 0) ? $url : rtrim(Yii::getAlias('@web/'.$url),'/');
|
|
|
$url = (strpos($url,'http') === 0) ? $url : Yii::getAlias('@web/'.trim($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 : rtrim(Yii::getAlias('@web/'.$url),'/');
|
|
|
$url = (strpos($url,'http') === 0) ? $url : Yii::getAlias('@web/'.trim($url,'/'));
|
|
|
return Yii::$app->getResponse()->redirect($url);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -108,7 +108,7 @@ class BaseController extends Controller |
|
|
*/
|
|
|
public function refresh($anchor = '')
|
|
|
{
|
|
|
$url = rtrim(Yii::getAlias('@web/'.Yii::$app->getRequest()->getUrl()),'/') . $anchor;
|
|
|
$url = Yii::getAlias('@web/'.trim(Yii::$app->getRequest()->getUrl(),'/')) . $anchor;
|
|
|
return Yii::$app->getResponse()->redirect($url);
|
|
|
}
|
|
|
|
...
|
...
|
|