diff options
author | mensonge | 2008-09-11 16:51:00 +0000 |
---|---|---|
committer | mensonge | 2008-09-11 16:51:00 +0000 |
commit | 1d059dc06d24e02c858c43d70eaa70453d51cdff (patch) | |
tree | d29378c81ec8a9498a33ed7276722031c1f12981 /services/bookmark2tagservice.php | |
parent | bfdc6bd7380fda2d5d8ca78a462047069c4020bc (diff) | |
download | scuttle-1d059dc06d24e02c858c43d70eaa70453d51cdff.tar.gz scuttle-1d059dc06d24e02c858c43d70eaa70453d51cdff.zip |
New Feature: add users admin page with delete function
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@146 b3834d28-1941-0410-a4f8-b48e95affb8f
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); |