X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FItem.php;h=eac3b7028623dac5bdee844b471eb1721c43b793;hb=7b7132971a64a92a685a5fd860fe4709dce1765a;hp=71e37bd18ec3fdbede2f7a562b3c265bcd91440b;hpb=ca1b92bb34ef851d364f0174accbf265814fe311;p=friendica.git diff --git a/src/Model/Item.php b/src/Model/Item.php index 71e37bd18e..eac3b70286 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -1116,6 +1116,7 @@ class Item */ public static function deleteById($item_id, $priority = PRIORITY_HIGH) { + Logger::notice('Delete item by id', ['id' => $item_id, 'callstack' => System::callstack()]); // locate item to be deleted $fields = ['id', 'uri', 'uid', 'parent', 'parent-uri', 'origin', 'deleted', 'file', 'resource-id', 'event-id', 'attach', @@ -1938,7 +1939,7 @@ class Item if ($entries > 1) { // There are duplicates. We delete our just created entry. - Logger::log('Duplicated post occurred. uri = ' . $item['uri'] . ' uid = ' . $item['uid']); + Logger::notice('Delete duplicated item', ['id' => $current_post, 'uri' => $item['uri'], 'uid' => $item['uid']]); // Yes, we could do a rollback here - but we are having many users with MyISAM. DBA::delete('item', ['id' => $current_post]); @@ -2721,9 +2722,7 @@ class Item if (!$mention) { if (($community_page || $prvgroup) && !$item['wall'] && !$item['origin'] && ($item['id'] == $item['parent'])) { - // mmh.. no mention.. community page or private group... no wall.. no origin.. top-post (not a comment) - // delete it! - Logger::log("no-mention top-level post to community or private group. delete."); + Logger::notice('Delete private group/communiy top-level item without mention', ['id' => $item_id]); DBA::delete('item', ['id' => $item_id]); return true; } @@ -3371,7 +3370,7 @@ class Item $condition = ["`uri` = ? AND NOT `deleted` AND NOT (`uid` IN (?, 0))", $itemuri, $item["uid"]]; if (!self::exists($condition)) { DBA::delete('item', ['uri' => $itemuri, 'uid' => 0]); - Logger::log("deleteThread: Deleted shadow for item ".$itemuri, Logger::DEBUG); + Logger::debug('Deleted shadow item', ['id' => $itemid, 'uri' => $itemuri]); } } } @@ -3634,7 +3633,7 @@ class Item $title .= ' ' . $mtch[2] . ' ' . DI::l10n()->t('bytes'); $icon = '
'; - $as .= '' . $icon . ''; + $as .= '' . $icon . ''; } if ($as != '') {