Remove globals

This commit is contained in:
2023-08-31 16:59:41 +03:00
parent be5779ff27
commit 3b4bbf3a6a
3 changed files with 7 additions and 4 deletions
+6 -2
View File
@@ -583,6 +583,10 @@ class User
private function __construct()
{
if (empty($_SESSION['uid']) && empty($_COOKIE['login'])) {
return;
}
$user = !empty($_SESSION['uid']) ? $_SESSION['uid'] : $_COOKIE['login'];
$this->info = self::getInfo($user);
unset($user);
@@ -2000,7 +2004,7 @@ class User
[$id]
);
}
$r = '';
if (
isset($inf['id']) &&
(
@@ -5544,7 +5548,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
if (!isset($po['nodelete'])) {
$is1 .= ' <a onClick="top.drop(' . $pl['id'] . ',\'' . $pl['img'] . '\',\'' . $pl['name'] . '\',1,\'<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2><img src=\\\'' . Config::img() . '/i/items/' . $pl['img'] . '\\\'></td><td align=\\\'left\\\'>Предмет <strong>' . $pl['name'] . '</strong> будет утерян, вы уверены ?</td></tr></table>\',\'' . intval(
$_GET['otdel']
) . '\'); return false;" href="javascript:void(0);" title="Выкинуть предмет"><img src="' . Config::img() . '/i/clear.gif"></a>';
) . ' . Config::img() . ' / i / clear . gif"></a>';
}
}
}