From 987e033d13bc6267a49d5a9b5cf96b86d8728d97 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Fri, 8 Dec 2023 13:36:28 +0700 Subject: [PATCH] Removed useless global $lang; from info.php (#1195) --- info.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/info.php b/info.php index 45adc9645..219dce4d0 100644 --- a/info.php +++ b/info.php @@ -14,13 +14,10 @@ require __DIR__ . '/common.php'; // Start session management $user->session_start(); -global $lang; - $info = []; -$html_dir = LANG_DIR . 'html/'; -$req_mode = (string)($_REQUEST['show'] ?? ''); +$htmlDir = LANG_DIR . 'html/'; -switch ($req_mode) { +switch ((string)$_REQUEST['show']) { case 'advert': $info['title'] = $lang['ADVERT']; $info['src'] = 'advert.html'; @@ -43,7 +40,7 @@ switch ($req_mode) { break; } -$require = file_exists($html_dir . $info['src']) ? $html_dir . $info['src'] : false; +$require = file_exists($htmlDir . $info['src']) ? ($htmlDir . $info['src']) : false; $template->assign_vars([ 'PAGE_TITLE' => mb_strtoupper($info['title'], 'UTF-8'),