From 5bcd594660941b2d4560da70788be17b52ef68eb Mon Sep 17 00:00:00 2001 From: Marcus Campbell Date: Sat, 9 Dec 2006 06:43:03 +0000 Subject: [PATCH] Trunk, 0.7: Add patch [ 1597978 ] Missing tag rename for 0.7.2 --- tagrename.php | 67 +++++++++++++++++++++++++++++++++++++ templates/tagrename.tpl.php | 42 +++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 tagrename.php create mode 100644 templates/tagrename.tpl.php diff --git a/tagrename.php b/tagrename.php new file mode 100644 index 0000000..0fd2f1a --- /dev/null +++ b/tagrename.php @@ -0,0 +1,67 @@ +loadTemplate('error.500.tpl', $tplVars); + exit(); + } else { + // Rename the tag. + if($tagservice->renameTag($userservice->getCurrentUserId(), $old, $new, true)) { + $tplVars['msg'] = T_('Tag renamed'); + $logged_on_user = $userservice->getCurrentUser(); + header('Location: '. createURL('bookmarks', $logged_on_user[$userservice->getFieldName('username')])); + } else { + $tplVars['error'] = T_('Failed to rename the tag'); + $templateservice->loadTemplate('error.500.tpl', $tplVars); + exit(); + } + } +} elseif ($_POST['cancel']) { + $logged_on_user = $userservice->getCurrentUser(); + header('Location: '. createURL('bookmarks', $logged_on_user[$userservice->getFieldName('username')] .'/'. $tags)); +} + +$tplVars['subtitle'] = T_('Rename Tag') .': '. $tag; +$tplVars['formaction'] = $_SERVER['SCRIPT_NAME'] .'/'. $tag; +$tplVars['referrer'] = $_SERVER['HTTP_REFERER']; +$tplVars['old'] = $tag; +$templateservice->loadTemplate('tagrename.tpl', $tplVars); +?> + diff --git a/templates/tagrename.tpl.php b/templates/tagrename.tpl.php new file mode 100644 index 0000000..2e93fad --- /dev/null +++ b/templates/tagrename.tpl.php @@ -0,0 +1,42 @@ +includeTemplate($GLOBALS['top_include']); +?> + +
+ + + + + + + + + + + + + + + + + +
+ + +
+

+ + +
+ + +
+ +includeTemplate($GLOBALS['bottom_include']); +?> + -- 2.39.2