mirror of
https://github.com/friendica/friendica
synced 2025-04-27 04:30:11 +00:00
Code reworks: replaced hardcoded network text with the corresponding constants.
This commit is contained in:
parent
dea1b067bd
commit
0e895e24f7
7 changed files with 21 additions and 18 deletions
|
@ -78,19 +78,19 @@ function contact_selector($selname, $selclass, $preselected = false, $options) {
|
|||
if(x($options,'networks')) {
|
||||
switch($options['networks']) {
|
||||
case 'DFRN_ONLY':
|
||||
$networks = array('dfrn');
|
||||
$networks = array(NETWORK_DFRN);
|
||||
break;
|
||||
case 'PRIVATE':
|
||||
if(is_array($a->user) && $a->user['prvnets'])
|
||||
$networks = array('dfrn','mail','dspr');
|
||||
$networks = array(NETWORK_DFRN,NETWORK_MAIL,NETWORK_DIASPORA);
|
||||
else
|
||||
$networks = array('dfrn','face','mail', 'dspr');
|
||||
$networks = array(NETWORK_DFRN,NETWORK_FACEBOOK,NETWORK_MAIL, NETWORK_DIASPORA);
|
||||
break;
|
||||
case 'TWO_WAY':
|
||||
if(is_array($a->user) && $a->user['prvnets'])
|
||||
$networks = array('dfrn','mail','dspr');
|
||||
$networks = array(NETWORK_DFRN,NETWORK_MAIL,NETWORK_DIASPORA);
|
||||
else
|
||||
$networks = array('dfrn','face','mail','dspr','stat');
|
||||
$networks = array(NETWORK_DFRN,NETWORK_FACEBOOK,NETWORK_MAIL,NETWORK_DIASPORA,NETWORK_OSTATUS);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -182,10 +182,10 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
|
|||
}
|
||||
|
||||
if($privmail) {
|
||||
$sql_extra .= " AND `network` IN ( 'dfrn', 'dspr' ) ";
|
||||
$sql_extra .= " AND `network` IN ( NETWORK_DFRN, NETWORK_DIASPORA ) ";
|
||||
}
|
||||
elseif($privatenet) {
|
||||
$sql_extra .= " AND `network` IN ( 'dfrn', 'mail', 'face', 'dspr' ) ";
|
||||
$sql_extra .= " AND `network` IN ( NETWORK_DFRN, NETWORK_MAIL, NETWORK_FACEBOOK, NETWORK_DIASPORA ) ";
|
||||
}
|
||||
|
||||
$tabindex = ($tabindex > 0 ? "tabindex=\"$tabindex\"" : "");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue