forked from Cavemanon/cavepaintings
extra stuff
git-svn-id: file:///home/shish/svn/shimmie2/trunk@1140 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
@ -83,11 +83,7 @@ class ImageBan implements Extension {
|
||||
}
|
||||
}
|
||||
else if($event->get_arg(0) == "list") {
|
||||
$page_num = 0;
|
||||
if($event->count_args() == 2) {
|
||||
$page_num = int_escape($event->get_arg(1));
|
||||
}
|
||||
$this->theme->display_Image_hash_Bans($event->page, $page_num, $this->get_image_hash_bans($page_num));
|
||||
$this->theme->display_Image_hash_Bans($event->page, $this->get_image_hash_bans());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -128,12 +124,10 @@ class ImageBan implements Extension {
|
||||
|
||||
// DB funness
|
||||
|
||||
public function get_image_hash_bans($page, $size=1000) {
|
||||
public function get_image_hash_bans() {
|
||||
// FIXME: many
|
||||
$size_i = int_escape($size);
|
||||
$offset_i = int_escape($page)*$size_i;
|
||||
global $database;
|
||||
$bans = $database->get_all("SELECT * FROM image_bans LIMIT $size_i OFFSET $offset_i");
|
||||
$bans = $database->get_all("SELECT * FROM image_bans");
|
||||
if($bans) {return $bans;}
|
||||
else {return array();}
|
||||
}
|
||||
|
Reference in New Issue
Block a user