X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FItem.php;h=bdb85af44141e28f5bad05507af81338283ce1a0;hb=8cabfdde768cf22dffbd2f1d140ff850824ed19a;hp=292301a4e96c32485d65e240379288d98de93339;hpb=b7a5e076fc4d10253d703165040f4ba12e82915f;p=friendica.git diff --git a/src/Model/Item.php b/src/Model/Item.php index 292301a4e9..bdb85af441 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -29,7 +29,6 @@ use Text_LanguageDetect; require_once 'boot.php'; require_once 'include/items.php'; require_once 'include/text.php'; -require_once 'include/event.php'; class Item extends BaseObject { @@ -98,7 +97,7 @@ class Item extends BaseObject * @param integer $item_id Item ID that should be delete * @param integer $priority Priority for the notification * - * @return $boolean success + * @return boolean success */ public static function deleteById($item_id, $priority = PRIORITY_HIGH) { @@ -153,7 +152,7 @@ class Item extends BaseObject // If item is a link to an event, delete the event. if (intval($item['event-id'])) { - event_delete($item['event-id']); + Event::delete($item['event-id']); } // If item has attachments, drop them @@ -356,6 +355,10 @@ class Item extends BaseObject } } + if (!empty($item['thr-parent'])) { + $item['parent-uri'] = $item['thr-parent']; + } + if (x($item, 'gravity')) { $item['gravity'] = intval($item['gravity']); } elseif ($item['parent-uri'] === $item['uri']) {