summaryrefslogtreecommitdiffstatshomepage
path: root/src/SemanticScuttle/Service/Bookmark.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/SemanticScuttle/Service/Bookmark.php')
-rw-r--r--src/SemanticScuttle/Service/Bookmark.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php
index f617059..7eb1174 100644
--- a/src/SemanticScuttle/Service/Bookmark.php
+++ b/src/SemanticScuttle/Service/Bookmark.php
@@ -661,7 +661,13 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
);
}
- $this->db->sql_transaction('commit');
+ if (!$this->db->sql_transaction('commit')) {
+ $this->db->sql_transaction('rollback');
+ message_die(
+ GENERAL_ERROR, 'Could not commit bookmark update',
+ '', __LINE__, __FILE__, $sql, $this->db
+ );
+ }
// Everything worked out, so return true.
return true;
}
@@ -1011,7 +1017,13 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
);
}
- $this->db->sql_transaction('commit');
+ if (!$this->db->sql_transaction('commit')) {
+ $this->db->sql_transaction('rollback');
+ message_die(
+ GENERAL_ERROR, 'Could not commit deleting votes for bookmark',
+ '', __LINE__, __FILE__, $query, $this->db
+ );
+ }
return true;
}