Image to Post - not a tag

This commit is contained in:
Matthew Barbour 2020-10-26 10:23:22 -05:00
parent 13582d842f
commit 1dcb694f3d
2 changed files with 5 additions and 5 deletions

View File

@ -147,7 +147,7 @@ class NotATag extends Extension
"DELETE FROM untags WHERE LOWER(tag) = LOWER(:tag)", "DELETE FROM untags WHERE LOWER(tag) = LOWER(:tag)",
["tag"=>$input['d_tag']] ["tag"=>$input['d_tag']]
); );
$page->flash("Image ban removed"); $page->flash("Post ban removed");
$page->set_mode(PageMode::REDIRECT); $page->set_mode(PageMode::REDIRECT);
$page->set_redirect(referer_or(make_link())); $page->set_redirect(referer_or(make_link()));
} elseif ($event->get_arg(0) == "list") { } elseif ($event->get_arg(0) == "list") {

View File

@ -13,12 +13,12 @@ class NotATagTest extends ShimmiePHPUnitTestCase
// Original // Original
$this->get_page("post/view/$image_id"); $this->get_page("post/view/$image_id");
$this->assert_title("Image $image_id: pbx"); $this->assert_title("Post $image_id: pbx");
// Modified OK // Modified OK
send_event(new TagSetEvent($image, ["two"])); send_event(new TagSetEvent($image, ["two"]));
$this->get_page("post/view/$image_id"); $this->get_page("post/view/$image_id");
$this->assert_title("Image $image_id: two"); $this->assert_title("Post $image_id: two");
// Modified Bad as user - redirect // Modified Bad as user - redirect
try { try {
@ -28,12 +28,12 @@ class NotATagTest extends ShimmiePHPUnitTestCase
$this->assertTrue(true); $this->assertTrue(true);
} }
$this->get_page("post/view/$image_id"); $this->get_page("post/view/$image_id");
$this->assert_title("Image $image_id: two"); $this->assert_title("Post $image_id: two");
// Modified Bad as admin - ignore (should warn?) // Modified Bad as admin - ignore (should warn?)
$this->log_in_as_admin(); $this->log_in_as_admin();
send_event(new TagSetEvent($image, ["four", "face"])); send_event(new TagSetEvent($image, ["four", "face"]));
$this->get_page("post/view/$image_id"); $this->get_page("post/view/$image_id");
$this->assert_title("Image $image_id: four"); $this->assert_title("Post $image_id: four");
} }
} }