1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-01-19 17:28:41 +01:00

?/bans: fix pagination - can now see all bans on all boards if > $config[mod][banlist_page]

This commit is contained in:
8chan 2014-09-13 16:37:33 +00:00
parent c8f512a270
commit 4e94338ab2

View File

@ -175,7 +175,11 @@ class Bans {
}
static public function count($board = false) {
if (!$board) {
$query = prepare("SELECT COUNT(*) FROM ``bans``");
} else {
$query = prepare("SELECT COUNT(*) FROM ``bans`` WHERE `board` = :board");
}
$query->bindValue(':board', $board);
$query->execute() or error(db_error());
return (int)$query->fetchColumn();