?/bans: fix pagination - can now see all bans on all boards if > $config[mod][banlist_page]
Conflicts: inc/bans.php
This commit is contained in:
parent
39cecea579
commit
66e026b361
10
inc/bans.php
10
inc/bans.php
@ -165,8 +165,14 @@ class Bans {
|
|||||||
return $bans;
|
return $bans;
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function count() {
|
static public function count($board = false) {
|
||||||
$query = query("SELECT COUNT(*) FROM ``bans``") or error(db_error());
|
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();
|
return (int)$query->fetchColumn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user