]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/GServer.php
File and category aren't using "term" anymore
[friendica.git] / src / Model / GServer.php
index 34bb8559c6cc6cbb7f7377853184ada02869066a..bc189af9d6bb7567ff531884ed214a2aaaca44c9 100644 (file)
@@ -1,14 +1,28 @@
 <?php
-
 /**
- * @file src/Model/GServer.php
- * This file includes the GServer class to handle with servers
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
  */
+
 namespace Friendica\Model;
 
 use DOMDocument;
 use DOMXPath;
-use Friendica\Core\Config;
 use Friendica\Core\Protocol;
 use Friendica\Core\Worker;
 use Friendica\Database\DBA;
@@ -733,7 +747,7 @@ class GServer
                        return false;
                }
 
-               $xrd = XML::parseString($curlResult->getBody(), false);
+               $xrd = XML::parseString($curlResult->getBody());
                if (!is_object($xrd)) {
                        return false;
                }
@@ -782,13 +796,13 @@ class GServer
                DBA::close($gcontacts);
 
                $apcontacts = DBA::select('apcontact', ['url'], ['baseurl' => [$url, $serverdata['nurl']]]);
-               while ($gcontact = DBA::fetch($gcontacts)) {
+               while ($apcontact = DBA::fetch($apcontacts)) {
                        $contacts[Strings::normaliseLink($apcontact['url'])] = $apcontact['url'];
                }
                DBA::close($apcontacts);
 
                $pcontacts = DBA::select('contact', ['url', 'nurl'], ['uid' => 0, 'baseurl' => [$url, $serverdata['nurl']]]);
-               while ($gcontact = DBA::fetch($gcontacts)) {
+               while ($pcontact = DBA::fetch($pcontacts)) {
                        $contacts[$pcontact['nurl']] = $pcontact['url'];
                }
                DBA::close($pcontacts);