X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fitems.php;h=a28e19a05a2cb11b9f3c8eeae17101dbb3f51c3c;hb=5e3a55915d7fdd554d711b2b5b619552a492c090;hp=3dd405e786072c42fa595f648ff94760df0e695d;hpb=55e54bb9500f54bb075dcbc2054018de0969d9e7;p=friendica.git diff --git a/include/items.php b/include/items.php index 3dd405e786..a28e19a05a 100644 --- a/include/items.php +++ b/include/items.php @@ -24,7 +24,8 @@ use Friendica\Util\ParseUrl; use Friendica\Util\Strings; use Friendica\Util\Temporal; -require_once 'mod/share.php'; +require_once __DIR__ . '/../mod/share.php'; + function add_page_info_data(array $data, $no_photos = false) { Hook::callAll('page_info_data', $data); @@ -242,26 +243,26 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false) * model where comments can have sub-threads. That would require some massive sorting * to get all the feed items into a mostly linear ordering, and might still require * recursion. + * + * @param $xml + * @param array $importer + * @param array $contact + * @param $hub + * @throws ImagickException + * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ -function consume_feed($xml, array $importer, array $contact, &$hub, $datedir = 0, $pass = 0) +function consume_feed($xml, array $importer, array $contact, &$hub) { if ($contact['network'] === Protocol::OSTATUS) { - if ($pass < 2) { - // Test - remove before flight - //$tempfile = tempnam(get_temppath(), "ostatus2"); - //file_put_contents($tempfile, $xml); - Logger::log("Consume OStatus messages ", Logger::DEBUG); - OStatus::import($xml, $importer, $contact, $hub); - } + Logger::log("Consume OStatus messages ", Logger::DEBUG); + OStatus::import($xml, $importer, $contact, $hub); return; } if ($contact['network'] === Protocol::FEED) { - if ($pass < 2) { - Logger::log("Consume feeds", Logger::DEBUG); - Feed::import($xml, $importer, $contact, $hub); - } + Logger::log("Consume feeds", Logger::DEBUG); + Feed::import($xml, $importer, $contact, $hub); return; } @@ -293,8 +294,6 @@ function subscribe_to_hub($url, array $importer, array $contact, $hubmode = 'sub return; } - $a = BaseObject::getApp(); - $user = DBA::selectFirst('user', ['nickname'], ['uid' => $importer['uid']]); // No user, no nickname, we quit