Merge branch 'master' of git://git.shishnet.org/shimmie2

This commit is contained in:
Shish 2009-10-26 10:50:56 +00:00
commit 07178e0c4d
2 changed files with 5 additions and 0 deletions

View File

@ -162,6 +162,7 @@ class CommentList extends SimpleExtension {
public function onImageDeletion($event) {
global $database;
$image_id = $event->image->id;
$database->Execute("DELETE FROM comments WHERE image_id=?", array($image_id));
log_info("comment", "Deleting all comments for Image #$image_id");
}

View File

@ -68,6 +68,10 @@ class CommentListTest extends ShimmieWebTestCase {
$this->log_in_as_admin();
$this->delete_image($image_id);
$this->log_out();
$this->get_page('comment/list');
$this->assert_title('Comments');
$this->assert_no_text('ASDFASDF');
}
function testSingleDel() {