1
0
Fork 0

dbclean is now using the new database functions / new functions for commit, rollback and transaction

This commit is contained in:
Michael 2017-05-11 20:13:45 +00:00
commit 6ef24890bb
6 changed files with 108 additions and 44 deletions

View file

@ -809,8 +809,7 @@ function item_post(App $a) {
$post_id = 0;
}
q("COMMIT");
q("START TRANSACTION;");
dba::transaction();
$r = q("INSERT INTO `item` (`guid`, `extid`, `uid`,`type`,`wall`,`gravity`, `network`, `contact-id`,
`owner-name`,`owner-link`,`owner-avatar`, `owner-id`,
@ -900,7 +899,7 @@ function item_post(App $a) {
}
if ($post_id == 0) {
q("COMMIT");
dba::commit();
logger('mod_item: unable to retrieve post that was just stored.');
notice(t('System error. Post not saved.') . EOL);
goaway($return_path);
@ -1026,7 +1025,7 @@ function item_post(App $a) {
update_thread($parent, true);
}
q("COMMIT");
dba::commit();
create_tags_from_item($post_id);
create_files_from_item($post_id);