aboutsummaryrefslogtreecommitdiff
path: root/tagdelete.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-02-21 16:00:35 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-02-21 16:00:35 +0000
commit73cf2a6898b1ea29bf6013a6ecc000e6b14e9688 (patch)
tree9e819cee55ad4a221d88e09e133866f4f79166db /tagdelete.php
parent50863e8fee72c0236b8d262e6f95f4ace85961c0 (diff)
downloadsemanticscuttle-73cf2a6898b1ea29bf6013a6ecc000e6b14e9688.tar.gz
semanticscuttle-73cf2a6898b1ea29bf6013a6ecc000e6b14e9688.tar.bz2
Code refactoring: rename getNbUpdate(s); clean delete() parameters
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@51 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'tagdelete.php')
-rw-r--r--tagdelete.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/tagdelete.php b/tagdelete.php
index 9f11bdd..c5325c5 100644
--- a/tagdelete.php
+++ b/tagdelete.php
@@ -24,12 +24,13 @@ $tagservice = & ServiceFactory :: getServiceInstance('TagService');
$templateservice = & ServiceFactory :: getServiceInstance('TemplateService');
$userservice = & ServiceFactory :: getServiceInstance('UserService');
+$logged_on_user = $userservice->getCurrentUser();
+
list ($url, $tag) = explode('/', $_SERVER['PATH_INFO']);
if ($_POST['confirm']) {
- if ($tagservice->deleteTag($tag)) {
- $tplVars['msg'] = T_('Tag deleted');
- $logged_on_user = $userservice->getCurrentUser();
+ if ($tagservice->deleteTag($logged_on_user['uId'], $tag)) {
+ $tplVars['msg'] = T_('Tag deleted');
header('Location: '. createURL('bookmarks', $logged_on_user[$userservice->getFieldName('username')]));
} else {
$tplVars['error'] = T_('Failed to delete the tag');
@@ -37,7 +38,6 @@ if ($_POST['confirm']) {
exit();
}
} elseif ($_POST['cancel']) {
- $logged_on_user = $userservice->getCurrentUser();
header('Location: '. createURL('bookmarks', $logged_on_user[$userservice->getFieldName('username')] .'/'. $tags));
}
@@ -45,4 +45,4 @@ $tplVars['subtitle'] = T_('Delete Tag') .': '. $tag;
$tplVars['formaction'] = $_SERVER['SCRIPT_NAME'] .'/'. $tag;
$tplVars['referrer'] = $_SERVER['HTTP_REFERER'];
$templateservice->loadTemplate('tagdelete.tpl', $tplVars);
-?> \ No newline at end of file
+?>