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
parent c623465df2
commit e06fc2aa69
59 changed files with 527 additions and 492 deletions

View file

@ -692,7 +692,7 @@ function api_get_user(App $a, $contact_id = null)
if ($uinfo[0]['self']) {
if ($uinfo[0]['network'] == "") {
$uinfo[0]['network'] = NETWORK_DFRN;
$uinfo[0]['network'] = Protocol::DFRN;
}
$usr = DBA::selectFirst('user', ['default-location'], ['uid' => api_user()]);
@ -4702,7 +4702,7 @@ function api_friendica_remoteauth()
$contact = DBA::selectFirst('contact', [], ['uid' => api_user(), 'nurl' => $c_url]);
if (!DBA::isResult($contact) || ($contact['network'] !== NETWORK_DFRN)) {
if (!DBA::isResult($contact) || ($contact['network'] !== Protocol::DFRN)) {
throw new BadRequestException("Unknown contact");
}