1
1
Fork 0

Stopped using deprecated constants NETWORK_* (#5537)

* Rewrite:
- stopped using deprecated NETWORK_* constants, now Protocol::* should be used
- still left them intact for slow/lazy developers ...

* Removed deprecated NETWORK_* constants as per code reviewer's request.
This commit is contained in:
Roland Häder 2018-08-11 22:40:44 +02:00 committed by Hypolite Petovan
commit e06fc2aa69
59 changed files with 527 additions and 492 deletions

View file

@ -5,6 +5,7 @@
use Friendica\App;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Protocol;
use Friendica\Core\System;
use Friendica\Model\Contact;
use Friendica\Network\Probe;
@ -72,8 +73,8 @@ function ostatus_subscribe_content(App $a) {
$o .= "<p>".$counter."/".$total.": ".$url;
$data = Probe::uri($url);
if ($data["network"] == NETWORK_OSTATUS) {
$result = Contact::createFromProbe($uid, $url, true, NETWORK_OSTATUS);
if ($data["network"] == Protocol::OSTATUS) {
$result = Contact::createFromProbe($uid, $url, true, Protocol::OSTATUS);
if ($result["success"]) {
$o .= " - ".L10n::t("success");
} else {