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:
parent
c623465df2
commit
e06fc2aa69
59 changed files with 527 additions and 492 deletions
|
@ -9,6 +9,7 @@ use Friendica\Content\ContactSelector;
|
|||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\NotificationsManager;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
|
||||
|
@ -181,8 +182,8 @@ function notifications_content(App $a)
|
|||
|
||||
// Normal connection requests
|
||||
default:
|
||||
$friend_selected = (($it['network'] !== NETWORK_OSTATUS) ? ' checked="checked" ' : ' disabled ');
|
||||
$fan_selected = (($it['network'] === NETWORK_OSTATUS) ? ' checked="checked" disabled ' : '');
|
||||
$friend_selected = (($it['network'] !== Protocol::OSTATUS) ? ' checked="checked" ' : ' disabled ');
|
||||
$fan_selected = (($it['network'] === Protocol::OSTATUS) ? ' checked="checked" disabled ' : '');
|
||||
$dfrn_tpl = get_markup_template('netfriend.tpl');
|
||||
|
||||
$knowyou = '';
|
||||
|
@ -192,8 +193,8 @@ function notifications_content(App $a)
|
|||
$helptext2 = '';
|
||||
$helptext3 = '';
|
||||
|
||||
if ($it['network'] === NETWORK_DFRN || $it['network'] === NETWORK_DIASPORA) {
|
||||
if ($it['network'] === NETWORK_DFRN) {
|
||||
if ($it['network'] === Protocol::DFRN || $it['network'] === Protocol::DIASPORA) {
|
||||
if ($it['network'] === Protocol::DFRN) {
|
||||
$lbl_knowyou = L10n::t('Claims to be known to you: ');
|
||||
$knowyou = (($it['knowyou']) ? L10n::t('yes') : L10n::t('no'));
|
||||
$helptext = L10n::t('Shall your connection be bidirectional or not?');
|
||||
|
@ -215,7 +216,7 @@ function notifications_content(App $a)
|
|||
'$approve_as2' => $helptext2,
|
||||
'$approve_as3' => $helptext3,
|
||||
'$as_friend' => L10n::t('Friend'),
|
||||
'$as_fan' => (($it['network'] == NETWORK_DIASPORA) ? L10n::t('Sharer') : L10n::t('Subscriber'))
|
||||
'$as_fan' => (($it['network'] == Protocol::DIASPORA) ? L10n::t('Sharer') : L10n::t('Subscriber'))
|
||||
]);
|
||||
|
||||
$header = $it["name"];
|
||||
|
@ -226,7 +227,7 @@ function notifications_content(App $a)
|
|||
|
||||
$header .= " (".ContactSelector::networkToName($it['network'], $it['url']).")";
|
||||
|
||||
if ($it['network'] != NETWORK_DIASPORA) {
|
||||
if ($it['network'] != Protocol::DIASPORA) {
|
||||
$discard = L10n::t('Discard');
|
||||
} else {
|
||||
$discard = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue