|
9 | 9 | use PhpMyAdmin\Config\Forms\User\FeaturesForm; |
10 | 10 | use PhpMyAdmin\ConfigStorage\Relation; |
11 | 11 | use PhpMyAdmin\Controllers\AbstractController; |
| 12 | +use PhpMyAdmin\Http\ServerRequest; |
12 | 13 | use PhpMyAdmin\ResponseRenderer; |
13 | | -use PhpMyAdmin\Routing; |
14 | 14 | use PhpMyAdmin\Template; |
15 | 15 | use PhpMyAdmin\TwoFactor; |
16 | 16 | use PhpMyAdmin\Url; |
@@ -43,16 +43,14 @@ public function __construct( |
43 | 43 | $this->config = $config; |
44 | 44 | } |
45 | 45 |
|
46 | | - public function __invoke(): void |
| 46 | + public function __invoke(ServerRequest $request): void |
47 | 47 | { |
48 | 48 | $GLOBALS['cf'] = $GLOBALS['cf'] ?? null; |
49 | 49 | $GLOBALS['error'] = $GLOBALS['error'] ?? null; |
50 | 50 | $GLOBALS['tabHash'] = $GLOBALS['tabHash'] ?? null; |
51 | 51 | $GLOBALS['hash'] = $GLOBALS['hash'] ?? null; |
52 | 52 | $GLOBALS['server'] = $GLOBALS['server'] ?? null; |
53 | 53 |
|
54 | | - $route = Routing::getCurrentRoute(); |
55 | | - |
56 | 54 | $GLOBALS['cf'] = new ConfigFile($this->config->baseSettings); |
57 | 55 | $this->userPreferences->pageInit($GLOBALS['cf']); |
58 | 56 |
|
@@ -92,7 +90,7 @@ public function __invoke(): void |
92 | 90 | $relationParameters = $this->relation->getRelationParameters(); |
93 | 91 |
|
94 | 92 | $this->render('preferences/header', [ |
95 | | - 'route' => $route, |
| 93 | + 'route' => $request->getRoute(), |
96 | 94 | 'is_saved' => ! empty($_GET['saved']), |
97 | 95 | 'has_config_storage' => $relationParameters->userPreferencesFeature !== null, |
98 | 96 | ]); |
|
0 commit comments