Image to Post - Admin extension

This commit is contained in:
Matthew Barbour 2020-10-26 10:12:07 -05:00
parent 840e661a42
commit 77ea8617d7
2 changed files with 6 additions and 6 deletions

View file

@ -15,9 +15,9 @@ class AdminPageInfo extends ExtensionInfo
<p>Lowercase all tags:
<br>Set all tags to lowercase for consistency
<p>Recount tag use:
<br>If the counts of images per tag get messed up somehow, this will reset them, and remove any unused tags
<br>If the counts of posts per tag get messed up somehow, this will reset them, and remove any unused tags
<p>Database dump:
<br>Download the contents of the database in plain text format, useful for backups.
<p>Image dump:
<br>Download all the images as a .zip file (Requires ZipArchive)";
<p>Post dump:
<br>Download all the posts as a .zip file (Requires ZipArchive)";
}

View file

@ -28,14 +28,14 @@ class AdminPageTest extends ShimmiePHPUnitTestCase
// Validate problem
$page = $this->get_page("post/view/$image_id_1");
$this->assertEquals("Image $image_id_1: TeStCase$ts", $page->title);
$this->assertEquals("Post $image_id_1: TeStCase$ts", $page->title);
// Fix
send_event(new AdminActionEvent('lowercase_all_tags'));
// Validate fix
$this->get_page("post/view/$image_id_1");
$this->assert_title("Image $image_id_1: testcase$ts");
$this->assert_title("Post $image_id_1: testcase$ts");
// Change
$_POST["tag"] = "TestCase$ts";
@ -43,7 +43,7 @@ class AdminPageTest extends ShimmiePHPUnitTestCase
// Validate change
$this->get_page("post/view/$image_id_1");
$this->assert_title("Image $image_id_1: TestCase$ts");
$this->assert_title("Post $image_id_1: TestCase$ts");
}
# FIXME: make sure the admin tools actually work