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
$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'),