use own class's delete function when removing expiring ban
This commit is contained in:
parent
57e4292e9d
commit
840e8cd093
@ -137,9 +137,7 @@ class Bans {
|
|||||||
|
|
||||||
while ($ban = $query->fetch(PDO::FETCH_ASSOC)) {
|
while ($ban = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||||
if ($ban['expires'] && ($ban['seen'] || !$config['require_ban_view']) && $ban['expires'] < time()) {
|
if ($ban['expires'] && ($ban['seen'] || !$config['require_ban_view']) && $ban['expires'] < time()) {
|
||||||
$query = prepare("DELETE FROM ``bans`` WHERE `id` = :id");
|
self::delete($ban['id']);
|
||||||
$query->bindValue(':id', $ban['id'], PDO::PARAM_INT);
|
|
||||||
$query->execute() or error(db_error($query));
|
|
||||||
} else {
|
} else {
|
||||||
if ($ban['post'])
|
if ($ban['post'])
|
||||||
$ban['post'] = json_decode($ban['post'], true);
|
$ban['post'] = json_decode($ban['post'], true);
|
||||||
|
Loading…
Reference in New Issue
Block a user