From c7c33a1a8d725873e8c0bf979406ae5811bfb03e Mon Sep 17 00:00:00 2001 From: shish Date: Sun, 17 Feb 2008 02:39:43 +0000 Subject: [PATCH] fix tag editing with danbooru theme, hopefully in a more permanant way git-svn-id: file:///home/shish/svn/shimmie2/trunk@721 7f39781d-f577-437e-ae19-be835c7a54ca --- ext/view/theme.php | 7 ++++++- themes/danbooru/view.theme.php | 27 ++------------------------- 2 files changed, 8 insertions(+), 26 deletions(-) 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; }