pull a bunch of r34 tweaks intro trunk

git-svn-id: file:///home/shish/svn/shimmie2/trunk@959 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish
2008-07-29 19:43:34 +00:00
parent 8ac2428820
commit c741ea216f
3 changed files with 25 additions and 3 deletions

View File

@ -46,8 +46,9 @@ class Image_Hash_Ban extends Extension {
if(is_a($event, 'DataUploadEvent')) {
global $database;
if ($database->db->GetOne("SELECT COUNT(*) FROM image_bans WHERE hash = ?", $event->hash) == 1) {
$event->veto("This image has been banned!");
$row = $database->db->GetRow("SELECT * FROM image_bans WHERE hash = ?", $event->hash);
if($row) {
$event->veto("Image ".html_escape($row["hash"])." has been banned, reason: ".format_text($row["reason"]));
}
}