summaryrefslogtreecommitdiffstatshomepage
path: root/src/SemanticScuttle/Service/Bookmark2Tag.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/SemanticScuttle/Service/Bookmark2Tag.php')
-rw-r--r--src/SemanticScuttle/Service/Bookmark2Tag.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/SemanticScuttle/Service/Bookmark2Tag.php b/src/SemanticScuttle/Service/Bookmark2Tag.php
index 2b95bd8..232fc80 100644
--- a/src/SemanticScuttle/Service/Bookmark2Tag.php
+++ b/src/SemanticScuttle/Service/Bookmark2Tag.php
@@ -208,7 +208,16 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_DbService
return false;
}
}
- $this->db->sql_transaction('commit');
+
+ if ($this->db->sql_transaction('commit')) {
+ $this->db->sql_transaction('rollback');
+ message_die(
+ GENERAL_ERROR, 'Could not commit attaching tags',
+ '', __LINE__, __FILE__, $sql, $this->db
+ );
+ return false;
+ }
+
return true;
}