diff --git a/ext/tag_edit/main.php b/ext/tag_edit/main.php index 0c74993d..4b35f9a6 100644 --- a/ext/tag_edit/main.php +++ b/ext/tag_edit/main.php @@ -66,7 +66,13 @@ class TagEdit implements Extension { if($event instanceof ImageInfoBoxBuildingEvent) { global $user; - $event->add_part($this->theme->get_editor_html($event->image, $user), 40); + global $config; + if($config->get_bool("tag_edit_anon") || !$user->is_anonymous()) { + $event->add_part($this->theme->get_tag_editor_html($event->image), 40); + } + if($config->get_bool("source_edit_anon") || !$user->is_anonymous()) { + $event->add_part($this->theme->get_source_editor_html($event->image), 41); + } } if($event instanceof SetupBuildingEvent) { diff --git a/ext/tag_edit/theme.php b/ext/tag_edit/theme.php index 2e32c426..13838605 100644 --- a/ext/tag_edit/theme.php +++ b/ext/tag_edit/theme.php @@ -18,28 +18,14 @@ class TagEditTheme extends Themelet { $page->add_block(new Block("Mass Tag Edit", $html)); } - public function get_editor_html($image, $user) { - $html = ""; + public function get_tag_editor_html($image) { + $h_tags = html_escape($image->get_tag_list()); + return "