forked from leftypol/leftypol
post.php, pages.php: pack and unpack source ip addresses of ban appeals
This commit is contained in:
parent
b0b684bdb1
commit
3cbf0c2fcf
2 changed files with 7 additions and 1 deletions
|
@ -1077,6 +1077,12 @@ function mod_ban_appeals() {
|
|||
WHERE `denied` != 1 ORDER BY `time`") or error(db_error());
|
||||
$ban_appeals = $query->fetchAll(PDO::FETCH_ASSOC);
|
||||
foreach ($ban_appeals as &$ban) {
|
||||
$unpacked_source_ip = inet_ntop($ban['source_ip']);
|
||||
if ($unpacked_source_ip !== false) {
|
||||
// IP inserted after the IPs were packeted. Display the converted version.
|
||||
$ban['source_ip'] = $unpacked_source_ip;
|
||||
}
|
||||
|
||||
if ($ban['post'])
|
||||
$ban['post'] = json_decode($ban['post'], true);
|
||||
$ban['mask'] = Bans::range_to_string(array($ban['ipstart'], $ban['ipend']));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue