diff --git a/mod/item.php b/mod/item.php index 38ff3b2a3e..e56e4c68d9 100644 --- a/mod/item.php +++ b/mod/item.php @@ -928,9 +928,9 @@ function drop_item(int $id, string $return = '') DI::baseUrl()->redirect('display/' . $item['guid']); } - $is_comment = ($item['gravity'] == GRAVITY_COMMENT) ? true : false; + $is_comment = $item['gravity'] == GRAVITY_COMMENT; $parentitem = null; - if (!empty($item['parent'])){ + if (!empty($item['parent'])) { $fields = ['guid']; $parentitem = Item::selectFirstForUser(local_user(), $fields, ['id' => $item['parent']]); } @@ -949,14 +949,12 @@ function drop_item(int $id, string $return = '') if (!empty($parentitem)) { DI::baseUrl()->redirect('display/' . $parentitem['guid']); //NOTREACHED - } - // In case something goes wrong + } // In case something goes wrong else { DI::baseUrl()->redirect('network'); //NOTREACHED } - } - else { + } else { // if unknown location or deleting top level post called from display if (empty($return_url) || strpos($return_url, 'display') !== false) { DI::baseUrl()->redirect('network'); diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index e0f0678262..2ca615581f 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -74,24 +74,24 @@ class Feed public static function consume($xml, array $importer, array $contact, &$hub) { if ($contact['network'] === Protocol::OSTATUS) { - Logger::log('Consume OStatus messages ', Logger::DEBUG); + Logger::info('Consume OStatus messages'); OStatus::import($xml, $importer, $contact, $hub); return; } if ($contact['network'] === Protocol::FEED) { - Logger::log('Consume feeds', Logger::DEBUG); + Logger::info('Consume feeds'); self::import($xml, $importer, $contact); return; } if ($contact['network'] === Protocol::DFRN) { - Logger::log('Consume DFRN messages', Logger::DEBUG); + Logger::info('Consume DFRN messages'); $dfrn_importer = DFRN::getImporter($contact['id'], $importer['uid']); if (!empty($dfrn_importer)) { - Logger::log('Now import the DFRN feed'); + Logger::info('Now import the DFRN feed'); DFRN::import($xml, $dfrn_importer, true); return; }