diff --git a/ext/tag_categories/theme.php b/ext/tag_categories/theme.php index 31af0a70..dc61b9e2 100644 --- a/ext/tag_categories/theme.php +++ b/ext/tag_categories/theme.php @@ -103,6 +103,9 @@ class TagCategoriesTheme extends Themelet '; // add html to stuffs + $page->set_title("Tag Categories"); + $page->set_heading("Tag Categories"); + $page->add_block(new NavBlock()); $page->add_block(new Block("Editing", $html, "main", 10)); } diff --git a/ext/tag_list/main.php b/ext/tag_list/main.php index 934ea2c1..5e6fba44 100644 --- a/ext/tag_list/main.php +++ b/ext/tag_list/main.php @@ -53,21 +53,25 @@ class TagList extends Extension } switch ($sub) { - default: case 'map': $this->theme->set_heading("Tag Map"); $this->theme->set_tag_list($this->build_tag_map($starts_with, $tags_min)); + $this->theme->display_page($page); break; case 'alphabetic': $this->theme->set_heading("Alphabetic Tag List"); $this->theme->set_tag_list($this->build_tag_alphabetic($starts_with, $tags_min)); + $this->theme->display_page($page); break; case 'popularity': $this->theme->set_heading("Tag List by Popularity"); $this->theme->set_tag_list($this->build_tag_popularity($tags_min)); + $this->theme->display_page($page); + break; + default: + // don't display anything break; } - $this->theme->display_page($page); } elseif ($event->page_matches("tags")) { $page->set_mode(PageMode::REDIRECT); $page->set_redirect(make_link("tags/map")); diff --git a/ext/tag_list/test.php b/ext/tag_list/test.php index a345508d..b58979c4 100644 --- a/ext/tag_list/test.php +++ b/ext/tag_list/test.php @@ -7,7 +7,7 @@ namespace Shimmie2; class TagListTest extends ShimmiePHPUnitTestCase { /** @var string[] */ - private array $pages = ["map", "alphabetic", "popularity", "categories"]; + private array $pages = ["map", "alphabetic", "popularity"]; public function testTagList(): void { @@ -20,9 +20,6 @@ class TagListTest extends ShimmiePHPUnitTestCase $this->get_page('tags/popularity'); $this->assert_title('Tag List'); - $this->get_page('tags/categories'); - $this->assert_title('Tag List'); - # FIXME: test that these show the right stuff }