summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-09-13 17:29:36 +1000
committerSavetheinternet <savetheinternet@tinyboard.org>2011-09-13 17:29:36 +1000
commitcabf49f0766ae20d035d36efd4f747a5cc7790db (patch)
treeee0437915e0185d8255da9e62d8cfed63d340a82
parent2b68ddaff0f05c8351ea677d2993e4bac319ae17 (diff)
Fixed bug making it impossible to remove bans from the ?/bans page.
-rw-r--r--mod.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/mod.php b/mod.php
index 30315971..3e389986 100644
--- a/mod.php
+++ b/mod.php
@@ -1440,12 +1440,12 @@
}
}
if(hasPermission($config['mod']['view_banexpired'])) {
- $query = prepare("SELECT * FROM `bans` LEFT JOIN `boards` ON `boards`.`id` = `board` INNER JOIN `mods` ON `mod` = `mods`.`id` GROUP BY `ip` ORDER BY (`expires` IS NOT NULL AND `expires` < :time), `set` DESC");
+ $query = prepare("SELECT `bans`.*, `username`, `uri` FROM `bans` LEFT JOIN `boards` ON `boards`.`id` = `board` INNER JOIN `mods` ON `mod` = `mods`.`id` GROUP BY `ip` ORDER BY (`expires` IS NOT NULL AND `expires` < :time), `set` DESC");
$query->bindValue(':time', time(), PDO::PARAM_INT);
$query->execute() or error(db_error($query));
} else {
// Filter out expired bans
- $query = prepare("SELECT * FROM `bans` LEFT JOIN `boards` ON `boards`.`id` = `board` INNER JOIN `mods` ON `mod` = `mods`.`id` GROUP BY `ip` WHERE `expires` = 0 OR `expires` > :time ORDER BY `set` DESC");
+ $query = prepare("SELECT `bans`.*, `username`, `uri` FROM `bans` LEFT JOIN `boards` ON `boards`.`id` = `board` INNER JOIN `mods` ON `mod` = `mods`.`id` GROUP BY `ip` WHERE `expires` = 0 OR `expires` > :time ORDER BY `set` DESC");
$query->bindValue(':time', time(), PDO::PARAM_INT);
$query->execute() or error(db_error($query));
}