Don't show the range if the "from" and "to" are the same
This commit is contained in:
parent
470c8390f8
commit
0e45779856
@ -23,7 +23,7 @@ $ipBanRS = hesk_dbQuery("SELECT `RangeStart`, `RangeEnd` FROM `".hesk_dbEscape($
|
|||||||
while ($row = hesk_dbFetchAssoc($ipBanRS)) {
|
while ($row = hesk_dbFetchAssoc($ipBanRS)) {
|
||||||
$ipFrom = long2ip($row['RangeStart']);
|
$ipFrom = long2ip($row['RangeStart']);
|
||||||
$ipTo = long2ip($row['RangeEnd']);
|
$ipTo = long2ip($row['RangeEnd']);
|
||||||
$ipDisplay = $ipFrom . ' - ' . $ipTo;
|
$ipDisplay = $ipFrom == $ipTo ? $ipFrom : $ipFrom . ' - ' . $ipTo;
|
||||||
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."banned_ips` (`ip_from`, `ip_to`, `ip_display`, `banned_by`, `dt`)
|
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."banned_ips` (`ip_from`, `ip_to`, `ip_display`, `banned_by`, `dt`)
|
||||||
VALUES (".$row['RangeStart'].", ".$row['RangeEnd'].", '".$ipDisplay."', ".$creator.", NOW())");
|
VALUES (".$row['RangeStart'].", ".$row['RangeEnd'].", '".$ipDisplay."', ".$creator.", NOW())");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user