X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fsalmon.php;h=6eea57f6a7e3a3d70066e83ea49aabf240e311f9;hb=f58d42e317cbf323fb2c802a0cb71a4799863008;hp=67e467a73fea89ceb7c9aa1dd03c50997f386129;hpb=1de3960e267a8d298348fbca18cf1be1f6a20f7a;p=friendica.git diff --git a/mod/salmon.php b/mod/salmon.php index 67e467a73f..6eea57f6a7 100644 --- a/mod/salmon.php +++ b/mod/salmon.php @@ -1,19 +1,36 @@ . + * */ + use Friendica\App; use Friendica\Core\Logger; -use Friendica\Core\PConfig; use Friendica\Core\Protocol; -use Friendica\Core\System; use Friendica\Database\DBA; +use Friendica\DI; use Friendica\Model\Contact; +use Friendica\Protocol\ActivityNamespace; use Friendica\Protocol\OStatus; use Friendica\Protocol\Salmon; use Friendica\Util\Crypto; -use Friendica\Util\Strings; use Friendica\Util\Network; +use Friendica\Util\Strings; function salmon_post(App $a, $xml = '') { @@ -36,7 +53,7 @@ function salmon_post(App $a, $xml = '') { // parse the xml - $dom = simplexml_load_string($xml,'SimpleXMLElement',0,NAMESPACE_SALMON_ME); + $dom = simplexml_load_string($xml,'SimpleXMLElement',0, ActivityNamespace::SALMON_ME); $base = null; @@ -157,7 +174,7 @@ function salmon_post(App $a, $xml = '') { if (!DBA::isResult($r)) { Logger::log('Author ' . $author_link . ' unknown to user ' . $importer['uid'] . '.'); - if (PConfig::get($importer['uid'], 'system', 'ostatus_autofriend')) { + if (DI::pConfig()->get($importer['uid'], 'system', 'ostatus_autofriend')) { $result = Contact::createFromProbe($importer['uid'], $author_link); if ($result['success']) {