<?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;
return false;
}
- $xrd = XML::parseString($curlResult->getBody(), false);
+ $xrd = XML::parseString($curlResult->getBody());
if (!is_object($xrd)) {
return false;
}
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);