mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 06:11:35 +08:00
replaced usages of $_GET with Request::queryParams
This commit is contained in:
@ -100,7 +100,7 @@ class Nav extends Widget
|
||||
$this->route = Yii::$app->controller->getRoute();
|
||||
}
|
||||
if ($this->params === null) {
|
||||
$this->params = $_GET;
|
||||
$this->params = Yii::$app->request->getQueryParams();
|
||||
}
|
||||
Html::addCssClass($this->options, 'nav');
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ class <?= $controllerClass ?> extends <?= StringHelper::basename($generator->bas
|
||||
public function actionIndex()
|
||||
{
|
||||
$searchModel = new <?= isset($searchModelAlias) ? $searchModelAlias : $searchModelClass ?>;
|
||||
$dataProvider = $searchModel->search($_GET);
|
||||
$dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());
|
||||
|
||||
return $this->render('index', [
|
||||
'dataProvider' => $dataProvider,
|
||||
|
@ -158,7 +158,7 @@ class Menu extends Widget
|
||||
$this->route = Yii::$app->controller->getRoute();
|
||||
}
|
||||
if ($this->params === null) {
|
||||
$this->params = $_GET;
|
||||
$this->params = Yii::$app->request->getQueryParams();
|
||||
}
|
||||
$items = $this->normalizeItems($this->items, $hasActiveChild);
|
||||
$options = $this->options;
|
||||
|
Reference in New Issue
Block a user