summaryrefslogtreecommitdiff
path: root/plugins/OStatus/lib/feeddiscovery.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/OStatus/lib/feeddiscovery.php')
-rw-r--r--plugins/OStatus/lib/feeddiscovery.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/plugins/OStatus/lib/feeddiscovery.php b/plugins/OStatus/lib/feeddiscovery.php
index 4ac243832..8a166a0be 100644
--- a/plugins/OStatus/lib/feeddiscovery.php
+++ b/plugins/OStatus/lib/feeddiscovery.php
@@ -88,6 +88,16 @@ class FeedDiscovery
}
/**
+ * Get the referenced PuSH hub link from an Atom feed.
+ *
+ * @return mixed string or false
+ */
+ public function getHubLink()
+ {
+ return $this->getAtomLink('hub');
+ }
+
+ /**
* @param string $url
* @param bool $htmlOk pass false here if you don't want to follow web pages.
* @return string with validated URL
@@ -186,8 +196,9 @@ class FeedDiscovery
*/
function discoverFromHTML($url, $body)
{
- // DOMDocument::loadHTML may throw warnings on unrecognized elements.
- $old = error_reporting(error_reporting() & ~E_WARNING);
+ // DOMDocument::loadHTML may throw warnings on unrecognized elements,
+ // and notices on unrecognized namespaces.
+ $old = error_reporting(error_reporting() & ~(E_WARNING | E_NOTICE));
$dom = new DOMDocument();
$ok = $dom->loadHTML($body);
error_reporting($old);