mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-23 23:20:57 +01:00
?/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;
|
||||
}
|
||||
|
||||
static public function count() {
|
||||
$query = query("SELECT COUNT(*) FROM ``bans``") or error(db_error());
|
||||
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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user