From: Marcus Campbell Date: Sat, 9 Dec 2006 06:43:03 +0000 (+0000) Subject: Trunk, 0.7: Add patch [ 1597978 ] Missing tag rename for 0.7.2 X-Git-Url: https://projects.mako.cc/source/scuttle/commitdiff_plain/5bcd594660941b2d4560da70788be17b52ef68eb Trunk, 0.7: Add patch [ 1597978 ] Missing tag rename for 0.7.2 --- 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']); +?> +