From 146c63e90cd46b727fdc34acb1b224656d81efc5 Mon Sep 17 00:00:00 2001 From: mensonge Date: Fri, 14 Mar 2008 15:18:01 +0000 Subject: Feature improvement: make rename tags more consistent (with regards to linked tags) git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@85 b3834d28-1941-0410-a4f8-b48e95affb8f --- tagrename.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tagrename.php') diff --git a/tagrename.php b/tagrename.php index 2d611a7..18e9675 100644 --- a/tagrename.php +++ b/tagrename.php @@ -21,10 +21,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA require_once('header.inc.php'); $tagservice = & ServiceFactory :: getServiceInstance('TagService'); +$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2tagService'); $templateservice = & ServiceFactory :: getServiceInstance('TemplateService'); $userservice = & ServiceFactory :: getServiceInstance('UserService'); -$tag = isset($_GET['query']) ? $_GET['query'] : NULL; +list ($url, $tag) = explode('/', $_SERVER['PATH_INFO']); +//$tag = isset($_GET['query']) ? $_GET['query'] : NULL; $template = 'tagrename.tpl'; if ($_POST['confirm']) { @@ -41,7 +43,8 @@ if ($_POST['confirm']) { if ( !is_null($old) && !is_null($new) && - $tagservice->renameTag($userservice->getCurrentUserId(), $old, $new) + $tagservice->renameTag($userservice->getCurrentUserId(), $old, $new) && + $tag2tagservice->renameTag($userservice->getCurrentUserId(), $old, $new) ) { $tplVars['msg'] = T_('Tag renamed'); $logged_on_user = $userservice->getCurrentUser(); @@ -60,4 +63,4 @@ if ($_POST['confirm']) { $tplVars['old'] = $tag; } $templateservice->loadTemplate($template, $tplVars); -?> \ No newline at end of file +?> -- cgit v1.2.3