diff options
Diffstat (limited to 'services/bookmark2tagservice.php')
-rw-r--r-- | services/bookmark2tagservice.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/services/bookmark2tagservice.php b/services/bookmark2tagservice.php index 121ba8d..31ae4d2 100644 --- a/services/bookmark2tagservice.php +++ b/services/bookmark2tagservice.php @@ -179,6 +179,26 @@ class Bookmark2TagService { return true; } + /* Allow deletion in admin page */ + function deleteTagsForUser($uId) {
+ $qmask = 'DELETE FROM %s USING %s, %s WHERE %s.bId = %s.bId AND %s.uId = %d';
+ $query = sprintf($qmask,
+ $this->getTableName(),
+ $this->getTableName(),
+ $GLOBALS['tableprefix'].'bookmarks',
+ $this->getTableName(),
+ $GLOBALS['tableprefix'].'bookmarks',
+ $GLOBALS['tableprefix'].'bookmarks',
+ $uId);
+
+ if (!($dbresult =& $this->db->sql_query($query))) {
+ message_die(GENERAL_ERROR, 'Could not delete tags', '', __LINE__, __FILE__, $query, $this->db);
+ return false;
+ }
+
+ return true;
+ } + function &getTagsForBookmark($bookmarkid) { if (!is_int($bookmarkid)) { message_die(GENERAL_ERROR, 'Could not get tags (invalid bookmarkid)', '', __LINE__, __FILE__, $query); |