mirror of
https://github.com/friendica/friendica
synced 2025-04-27 09:50:12 +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
|
@ -8,6 +8,7 @@ namespace Friendica\Core;
|
|||
|
||||
use Friendica\BaseObject;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GContact;
|
||||
|
@ -46,18 +47,21 @@ class ACL extends BaseObject
|
|||
|
||||
switch (defaults($options, 'networks', Protocol::PHANTOM)) {
|
||||
case 'DFRN_ONLY':
|
||||
$networks = [NETWORK_DFRN];
|
||||
$networks = [Protocol::DFRN];
|
||||
break;
|
||||
|
||||
case 'PRIVATE':
|
||||
$networks = [NETWORK_DFRN, NETWORK_MAIL, NETWORK_DIASPORA];
|
||||
$networks = [Protocol::DFRN, Protocol::MAIL, Protocol::DIASPORA];
|
||||
break;
|
||||
|
||||
case 'TWO_WAY':
|
||||
if (!empty($a->user['prvnets'])) {
|
||||
$networks = [NETWORK_DFRN, NETWORK_MAIL, NETWORK_DIASPORA];
|
||||
$networks = [Protocol::DFRN, Protocol::MAIL, Protocol::DIASPORA];
|
||||
} else {
|
||||
$networks = [NETWORK_DFRN, NETWORK_MAIL, NETWORK_DIASPORA, NETWORK_OSTATUS];
|
||||
$networks = [Protocol::DFRN, Protocol::MAIL, Protocol::DIASPORA, Protocol::OSTATUS];
|
||||
}
|
||||
break;
|
||||
|
||||
default: /// @TODO Maybe log this call?
|
||||
break;
|
||||
}
|
||||
|
@ -148,7 +152,7 @@ class ACL extends BaseObject
|
|||
// When used for private messages, we limit correspondence to mutual DFRN/Friendica friends and the selector
|
||||
// to one recipient. By default our selector allows multiple selects amongst all contacts.
|
||||
$sql_extra = sprintf(" AND `rel` = %d ", intval(Contact::FRIEND));
|
||||
$sql_extra .= sprintf(" AND `network` IN ('%s' , '%s') ", NETWORK_DFRN, NETWORK_DIASPORA);
|
||||
$sql_extra .= sprintf(" AND `network` IN ('%s' , '%s') ", Protocol::DFRN, Protocol::DIASPORA);
|
||||
|
||||
$tabindex_attr = !empty($tabindex) ? ' tabindex="' . intval($tabindex) . '"' : '';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue