Removed useless global $lang; from info.php (#1195)

This commit is contained in:
Roman Kelesidis 2023-12-08 13:36:28 +07:00 committed by GitHub
commit 987e033d13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,13 +14,10 @@ require __DIR__ . '/common.php';
// Start session management // Start session management
$user->session_start(); $user->session_start();
global $lang;
$info = []; $info = [];
$html_dir = LANG_DIR . 'html/'; $htmlDir = LANG_DIR . 'html/';
$req_mode = (string)($_REQUEST['show'] ?? '');
switch ($req_mode) { switch ((string)$_REQUEST['show']) {
case 'advert': case 'advert':
$info['title'] = $lang['ADVERT']; $info['title'] = $lang['ADVERT'];
$info['src'] = 'advert.html'; $info['src'] = 'advert.html';
@ -43,7 +40,7 @@ switch ($req_mode) {
break; 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([ $template->assign_vars([
'PAGE_TITLE' => mb_strtoupper($info['title'], 'UTF-8'), 'PAGE_TITLE' => mb_strtoupper($info['title'], 'UTF-8'),