aboutsummaryrefslogtreecommitdiff
path: root/tagrename.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-03-14 15:18:01 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-03-14 15:18:01 +0000
commit146c63e90cd46b727fdc34acb1b224656d81efc5 (patch)
treeb93eff2f2eedf8d3f0736e8edd2a42d3f425e404 /tagrename.php
parentd10c26fd1de42d9d7030f383dc20ac2c17fccbd1 (diff)
downloadsemanticscuttle-146c63e90cd46b727fdc34acb1b224656d81efc5.tar.gz
semanticscuttle-146c63e90cd46b727fdc34acb1b224656d81efc5.tar.bz2
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
Diffstat (limited to 'tagrename.php')
-rw-r--r--tagrename.php9
1 files changed, 6 insertions, 3 deletions
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
+?>