]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/PortableContact.php
Fix Protocol\Diaspora missing user variable
[friendica.git] / src / Protocol / PortableContact.php
index 2b37a99624dab2cd5e5fe897697aefa065b6e9a8..e0213ca5c4cf18d587bbbe36cd932325bdb86e31 100644 (file)
@@ -17,9 +17,10 @@ use Friendica\Model\Profile;
 use Friendica\Network\Probe;
 use dba;
 use DOMDocument;
-use DomXPath;
+use DOMXPath;
 use Exception;
 
+require_once 'include/dba.php';
 require_once 'include/datetime.php';
 require_once 'include/network.php';
 require_once 'include/html2bbcode.php';
@@ -512,7 +513,7 @@ class PortableContact
                $doc = new DOMDocument();
                @$doc->loadXML($feedret["body"]);
 
-               $xpath = new DomXPath($doc);
+               $xpath = new DOMXPath($doc);
                $xpath->registerNamespace('atom', "http://www.w3.org/2005/Atom");
 
                $entries = $xpath->query('/atom:feed/atom:entry');
@@ -768,7 +769,7 @@ class PortableContact
 
                $doc = new DOMDocument();
                @$doc->loadHTML($body);
-               $xpath = new DomXPath($doc);
+               $xpath = new DOMXPath($doc);
 
                $list = $xpath->query("//meta[@name]");
 
@@ -815,7 +816,8 @@ class PortableContact
                        return false;
                }
 
-               $server["site_name"] = $xpath->evaluate($element."//head/title/text()", $context)->item(0)->nodeValue;
+               /// @fixme $element is unavailable here
+               $server["site_name"] = $xpath->evaluate($element."//head/title/text()")->item(0)->nodeValue;
                return $server;
        }