1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Replace MYPHPNET global var with the UserPreferences class (#1071)

This commit is contained in:
Maurício Meneghini Fauth
2024-09-17 04:55:10 -03:00
committed by GitHub
parent c7425ed96a
commit f252981e5b
5 changed files with 80 additions and 55 deletions

View File

@@ -9,6 +9,8 @@
*/
use phpweb\UserPreferences;
// Ensure that our environment is set up
include_once __DIR__ . '/include/prepend.inc';
include_once __DIR__ . '/include/languages.inc';
@@ -708,7 +710,7 @@ if (strpos($URI, "manual/") === 0) {
// ============================================================================
// If no match was found till this point, the last action is to start a
// search with the URI the user typed in
$fallback = (myphpnet_urlsearch() === MYPHPNET_URL_MANUAL ? "404manual" : "404quickref");
$fallback = (myphpnet_urlsearch() === UserPreferences::URL_MANUAL ? "404manual" : "404quickref");
mirror_redirect(
'/search.php?show=' . $fallback . '&lang=' . urlencode($LANG) .
'&pattern=' . substr($_SERVER['REQUEST_URI'], 1),