From 9a0aefc28bba04f674d901c6ffd6a9e63628feef Mon Sep 17 00:00:00 2001 From: cweiske Date: Sun, 25 Oct 2009 15:26:48 +0000 Subject: delete votes when deleting bookmark git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@409 b3834d28-1941-0410-a4f8-b48e95affb8f --- src/SemanticScuttle/Service/Bookmark.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/SemanticScuttle') diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php index 3e5e79f..29a2291 100644 --- a/src/SemanticScuttle/Service/Bookmark.php +++ b/src/SemanticScuttle/Service/Bookmark.php @@ -625,7 +625,8 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService { $bookmark = (int)$bookmark; - $query = 'DELETE FROM ' . $GLOBALS['tableprefix'] . 'bookmarks WHERE bId = '. $bookmark; + $query = 'DELETE FROM ' . $GLOBALS['tableprefix'] . 'bookmarks' + . ' WHERE bId = '. $bookmark; $this->db->sql_transaction('begin'); if (!($dbres = $this->db->sql_query($query))) { $this->db->sql_transaction('rollback'); @@ -636,7 +637,8 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService return false; } - $query = 'DELETE FROM ' . $GLOBALS['tableprefix'] . 'bookmarks2tags WHERE bId = '. $bookmark; + $query = 'DELETE FROM ' . $GLOBALS['tableprefix'] . 'bookmarks2tags' + . ' WHERE bId = '. $bookmark; $this->db->sql_transaction('begin'); if (!($dbres = $this->db->sql_query($query))) { $this->db->sql_transaction('rollback'); @@ -647,7 +649,8 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService return false; } - $query = 'DELETE FROM '. $GLOBALS['tableprefix'] .'votes WHERE bid = '. $bookmark; + $query = 'DELETE FROM '. $GLOBALS['tableprefix'] .'votes' + . ' WHERE bid = '. $bookmark; $this->db->sql_transaction('begin'); if (!($dbres = $this->db->sql_query($query))) { $this->db->sql_transaction('rollback'); -- cgit v1.2.3