Bugfix: Diaspora retractions not always worked

This commit is contained in:
Michael 2017-09-24 12:02:32 +00:00
parent 7430e83679
commit 80d787d990
2 changed files with 52 additions and 25 deletions

View file

@ -240,6 +240,11 @@ function delete_thread_uri($itemuri, $uid) {
function delete_thread($itemid, $itemuri = "") {
$item = q("SELECT `uid` FROM `thread` WHERE `iid` = %d", intval($itemid));
if (!dbm::is_result($item)) {
logger('No thread found for id '.$itemid, LOGGER_DEBUG);
return;
}
// Using dba::delete at this time could delete the associated item entries
$result = q("DELETE FROM `thread` WHERE `iid` = %d", intval($itemid));