|
27 | 27 |
|
28 | 28 | use function __; |
29 | 29 | use function count; |
30 | | -use function defined; |
31 | 30 | use function file_exists; |
32 | 31 | use function parse_url; |
33 | 32 | use function str_contains; |
|
40 | 39 | */ |
41 | 40 | class Navigation |
42 | 41 | { |
| 42 | + public static bool $isSettingsEnabled = true; |
| 43 | + |
43 | 44 | private NavigationTree $tree; |
44 | 45 | private readonly UserPrivilegesFactory $userPrivilegesFactory; |
45 | 46 |
|
@@ -98,7 +99,7 @@ public function getDisplay(): string |
98 | 99 | $serverSelect = Select::render(true); |
99 | 100 | } |
100 | 101 |
|
101 | | - if (! defined('PMA_DISABLE_NAVI_SETTINGS')) { |
| 102 | + if (self::$isSettingsEnabled) { |
102 | 103 | $pageSettings = new PageSettings( |
103 | 104 | new UserPreferences($this->dbi, new Relation($this->dbi), $this->template), |
104 | 105 | ); |
@@ -133,7 +134,7 @@ public function getDisplay(): string |
133 | 134 | 'servers' => $this->config->settings['Servers'], |
134 | 135 | 'server_select' => $serverSelect ?? '', |
135 | 136 | 'navigation_tree' => $navRender, |
136 | | - 'is_navigation_settings_enabled' => ! defined('PMA_DISABLE_NAVI_SETTINGS'), |
| 137 | + 'is_navigation_settings_enabled' => self::$isSettingsEnabled, |
137 | 138 | 'navigation_settings' => $navigationSettings ?? '', |
138 | 139 | 'is_drag_drop_import_enabled' => $this->config->settings['enable_drag_drop_import'] === true, |
139 | 140 | 'is_mariadb' => $this->dbi->isMariaDB(), |
|
0 commit comments