mirror of
https://github.com/friendica/friendica
synced 2025-04-24 03:10:11 +00:00
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 @@ namespace Friendica\Core;
|
|||
use Friendica\BaseObject;
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Content\Text\HTML;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Item;
|
||||
|
@ -235,7 +236,7 @@ class NotificationsManager extends BaseObject
|
|||
}
|
||||
|
||||
// For feed items we use the user's contact, since the avatar is mostly self choosen.
|
||||
if (!empty($it['network']) && $it['network'] == NETWORK_FEED) {
|
||||
if (!empty($it['network']) && $it['network'] == Protocol::FEED) {
|
||||
$it['author-avatar'] = $it['contact-avatar'];
|
||||
}
|
||||
|
||||
|
@ -639,14 +640,14 @@ class NotificationsManager extends BaseObject
|
|||
$it = $this->getMissingIntroData($it);
|
||||
|
||||
// Don't show these data until you are connected. Diaspora is doing the same.
|
||||
if ($it['gnetwork'] === NETWORK_DIASPORA) {
|
||||
if ($it['gnetwork'] === Protocol::DIASPORA) {
|
||||
$it['glocation'] = "";
|
||||
$it['gabout'] = "";
|
||||
$it['ggender'] = "";
|
||||
}
|
||||
$intro = [
|
||||
'label' => (($it['network'] !== NETWORK_OSTATUS) ? 'friend_request' : 'follower'),
|
||||
'notify_type' => (($it['network'] !== NETWORK_OSTATUS) ? L10n::t('Friend/Connect Request') : L10n::t('New Follower')),
|
||||
'label' => (($it['network'] !== Protocol::OSTATUS) ? 'friend_request' : 'follower'),
|
||||
'notify_type' => (($it['network'] !== Protocol::OSTATUS) ? L10n::t('Friend/Connect Request') : L10n::t('New Follower')),
|
||||
'dfrn_id' => $it['issued-id'],
|
||||
'uid' => $_SESSION['uid'],
|
||||
'intro_id' => $it['intro_id'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue