aboutsummaryrefslogtreecommitdiff
path: root/services/tag2tagservice.php
diff options
context:
space:
mode:
Diffstat (limited to 'services/tag2tagservice.php')
-rw-r--r--services/tag2tagservice.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/services/tag2tagservice.php b/services/tag2tagservice.php
index b2ffbf0..956fd49 100644
--- a/services/tag2tagservice.php
+++ b/services/tag2tagservice.php
@@ -309,6 +309,23 @@ class Tag2TagService {
$this->db->sql_freeresult($dbresult);
return true;
}
+
+ function removeLinkedTagsForUser($uId) {
+ $query = 'DELETE FROM '. $this->getTableName();
+ $query.= ' WHERE uId = "'. $uId .'"';
+
+ if (!($dbresult =& $this->db->sql_query($query))) {
+ message_die(GENERAL_ERROR, 'Could not remove tag relation', '', __LINE__, __FILE__, $query, $this->db);
+ return false;
+ }
+
+
+ // Update stats and cache
+ $this->update('', '', '', $uId);
+
+ $this->db->sql_freeresult($dbresult);
+ return true;
+ }
function renameTag($uId, $oldName, $newName) {
$tagservice =& ServiceFactory::getServiceInstance('TagService');