Split OStatusPlugin FeedSub receive into two parts
FeedSub::receive now only handles the PuSH verification FeedSub::receiveFeed is protected and only parses+imports feed XML
This commit is contained in:
parent
e87115d462
commit
f51cb6fca9
|
@ -460,8 +460,15 @@ class FeedSub extends Managed_DataObject
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->receiveFeed($post);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function receiveFeed($feed_xml)
|
||||||
|
{
|
||||||
|
// We're passed the XML for the Atom feed as $feed_xml,
|
||||||
|
// so read it into a DOMDocument and process.
|
||||||
$feed = new DOMDocument();
|
$feed = new DOMDocument();
|
||||||
if (!$feed->loadXML($post)) {
|
if (!$feed->loadXML($feed_xml)) {
|
||||||
// @fixme might help to include the err message
|
// @fixme might help to include the err message
|
||||||
common_log(LOG_ERR, __METHOD__ . ": ignoring invalid XML");
|
common_log(LOG_ERR, __METHOD__ . ": ignoring invalid XML");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user