make sure the image exists when posting a comment to it...
git-svn-id: file:///home/shish/svn/shimmie2/trunk@664 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
efa7da6c1c
commit
23dd70ae26
@ -310,6 +310,9 @@ class CommentList extends Extension {
|
||||
if(!$config->get_bool('comment_anon') && $user->is_anonymous()) {
|
||||
$event->veto("Anonymous posting has been disabled");
|
||||
}
|
||||
else if(is_null($database->get_image($image_id))) {
|
||||
$event->veto("The image does not exist");
|
||||
}
|
||||
else if(trim($comment) == "") {
|
||||
$event->veto("Comments need text...");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user