Skip to content

Commit d319518

Browse files
committed
🦄 refactor:Security tidy
1 parent c9cb3f5 commit d319518

4 files changed

Lines changed: 1 addition & 9 deletions

File tree

web/includes/class_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function __construct($columns, $keycol, $sort_default, $sort_default2,
127127

128128
function start($numitems, $width=100, $align='center')
129129
{
130-
global $g_options, $game, $realgame, $db;
130+
global $game, $realgame, $db;
131131
$numpages = ceil($numitems / $this->numperpage);
132132
?>
133133

web/pages/admintasks/options.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ function __construct($title)
6464

6565
function draw ()
6666
{
67-
global $g_options;
6867
?>
6968
<h4 class="mb-4 mt-4 text-lg font-semibold text-gray-600 dark:text-gray-300"><?php echo $this->title; ?></h4>
7069
<table class="data-table" style="width:75%">

web/pages/admintasks/serversettings.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ function setdefaults($key)
5050
// get default values
5151
$db->query("DELETE FROM hlstats_Servers_Config WHERE serverId=$key;");
5252
$db->query("INSERT INTO hlstats_Servers_Config (serverId, parameter, value) SELECT $key,parameter,value FROM hlstats_Servers_Config_Default");
53-
// get server ip and port
54-
$db->query("SELECT CONCAT(address, ':', port) AS addr FROM hlstats_Servers WHERE serverId=$key;");
55-
$r = $db->fetch_array();
5653
}
5754

5855
if (isset($_GET['key'])) {
@@ -114,9 +111,6 @@ function setdefaults($key)
114111
// copy server settings from another server
115112
$db->query("DELETE FROM hlstats_Servers_Config WHERE serverId=$key");
116113
$db->query("INSERT INTO hlstats_Servers_Config (serverId, parameter, value) SELECT $key,parameter,value FROM hlstats_Servers_Config WHERE serverId=$sourceId");
117-
// get server ip and port
118-
$db->query("SELECT CONCAT(address, ':', port) AS addr FROM hlstats_Servers WHERE serverId=$key;");
119-
$r = $db->fetch_array();
120114
} else {
121115
if ($edlist->update())
122116
message('success', 'Operation successful.');

web/pages/admintasks/tools_synchronize.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
function hide_cheaters($query) {
6565
global $db;
6666
$result = $db->query($query);
67-
$cheater = array();
6867
$query = "UPDATE hlstats_Players SET last_event = IF(hideranking <> 2, UNIX_TIMESTAMP(), last_event), hideranking = 2 WHERE playerId IN ";
6968
$insert_part = "";
7069
$first = 0;

0 commit comments

Comments
 (0)