Remove consume_feed in favor of Protocol\Feed::consume

This commit is contained in:
Hypolite Petovan 2020-07-14 10:14:05 -04:00
parent acea18a255
commit a1d62734fa
3 changed files with 6 additions and 13 deletions

View File

@ -63,12 +63,3 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false)
{ {
return \Friendica\Content\PageInfo::appendToBody($body, $texturl, $no_photos); return \Friendica\Content\PageInfo::appendToBody($body, $texturl, $no_photos);
} }
/**
* @deprecated since 2020.06
* @see \Friendica\Protocol\Feed::consume
*/
function consume_feed($xml, array $importer, array $contact, &$hub)
{
\Friendica\Protocol\Feed::consume($xml, $importer, $contact, $hub);
}

View File

@ -25,6 +25,7 @@ use Friendica\Core\Protocol;
use Friendica\Database\DBA; use Friendica\Database\DBA;
use Friendica\DI; use Friendica\DI;
use Friendica\Model\Contact; use Friendica\Model\Contact;
use Friendica\Protocol\Feed;
use Friendica\Protocol\OStatus; use Friendica\Protocol\OStatus;
use Friendica\Util\Strings; use Friendica\Util\Strings;
use Friendica\Util\Network; use Friendica\Util\Network;
@ -146,11 +147,11 @@ function pubsub_post(App $a)
Logger::log('Import item for ' . $nick . ' from ' . $contact['nick'] . ' (' . $contact['id'] . ')'); Logger::log('Import item for ' . $nick . ' from ' . $contact['nick'] . ' (' . $contact['id'] . ')');
$feedhub = ''; $feedhub = '';
consume_feed($xml, $importer, $contact, $feedhub); Feed::consume($xml, $importer, $contact, $feedhub);
// do it a second time for DFRN so that any children find their parents. // do it a second time for DFRN so that any children find their parents.
if ($contact['network'] === Protocol::DFRN) { if ($contact['network'] === Protocol::DFRN) {
consume_feed($xml, $importer, $contact, $feedhub); Feed::consume($xml, $importer, $contact, $feedhub);
} }
hub_post_return(); hub_post_return();

View File

@ -31,6 +31,7 @@ use Friendica\Model\User;
use Friendica\Protocol\Activity; use Friendica\Protocol\Activity;
use Friendica\Protocol\ActivityPub; use Friendica\Protocol\ActivityPub;
use Friendica\Protocol\Email; use Friendica\Protocol\Email;
use Friendica\Protocol\Feed;
use Friendica\Protocol\PortableContact; use Friendica\Protocol\PortableContact;
use Friendica\Util\DateTimeFormat; use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network; use Friendica\Util\Network;
@ -173,11 +174,11 @@ class OnePoll
Logger::log("Consume feed of contact ".$contact['id']); Logger::log("Consume feed of contact ".$contact['id']);
consume_feed($xml, $importer, $contact, $hub); Feed::consume($xml, $importer, $contact, $hub);
// do it a second time for DFRN so that any children find their parents. // do it a second time for DFRN so that any children find their parents.
if ($protocol === Protocol::DFRN) { if ($protocol === Protocol::DFRN) {
consume_feed($xml, $importer, $contact, $hub); Feed::consume($xml, $importer, $contact, $hub);
} }
$hubmode = 'subscribe'; $hubmode = 'subscribe';