diff --git a/ext/view/theme.php b/ext/view/theme.php index efffb47a..e2e254d9 100644 --- a/ext/view/theme.php +++ b/ext/view/theme.php @@ -77,12 +77,17 @@ class ViewTheme extends Themelet { $html .= " (source)"; } } - $html .= " (edit info)"; + $html .= $this->build_image_editor($image, $editor_parts); + return $html; + } + + protected function build_image_editor($image, $editor_parts) { if(isset($_GET['search'])) {$h_query = "search=".url_escape($_GET['search']);} else {$h_query = "";} + $html = " (edit info)"; $html .= "
diff --git a/themes/danbooru/view.theme.php b/themes/danbooru/view.theme.php index 36a15144..7491d7d3 100644 --- a/themes/danbooru/view.theme.php +++ b/themes/danbooru/view.theme.php @@ -14,7 +14,7 @@ class CustomViewTheme extends ViewTheme { var $pin = null; - protected function build_info($image) { + protected function build_info($image, $editor_parts) { global $user; $owner = $image->get_owner(); $h_owner = html_escape($owner->name); @@ -36,30 +36,7 @@ class CustomViewTheme extends ViewTheme { } } - global $config; - global $user; - if($config->get_bool("tag_edit_anon") || ($user->id != $config->get_int("anon_id"))) { - $html .= " (edit)"; - - if(isset($_GET['search'])) {$h_query = "search=".url_escape($_GET['search']);} - else {$h_query = "";} - - $h_tags = html_escape($image->get_tag_list()); - $i_image_id = int_escape($image->id); - - $html .= " -
- - - - - - -
Tags
Source
 
- -
- "; - } + $html .= $this->build_image_editor($image, $editor_parts); return $html; }