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;
}
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\"" : "");
if((activity_match($item['verb'],$verb)) && ($item['id'] != $item['parent'])) {
$url = $item['author-link'];
- if((local_user()) && (local_user() == $item['uid']) && ($item['network'] === 'dfrn') && (! $item['self']) && (link_compare($item['author-link'],$item['url']))) {
+ if((local_user()) && (local_user() == $item['uid']) && ($item['network'] === NETWORK_DFRN) && (! $item['self']) && (link_compare($item['author-link'],$item['url']))) {
$url = $a->get_baseurl(true) . '/redir/' . $item['contact-id'];
$sparkle = ' class="sparkle" ';
}
if($redirect) {
$a = get_app();
$redirect_url = $a->get_baseurl() . '/redir/' . $contact['id'];
- if(local_user() && ($contact['uid'] == local_user()) && ($contact['network'] === 'dfrn')) {
+ if(local_user() && ($contact['uid'] == local_user()) && ($contact['network'] === NETWORK_DFRN)) {
$redir = true;
$url = $redirect_url;
$sparkle = ' sparkle';
$vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"),array(
'$name' => $a->data['contact']['name'],
'$photo' => $a->data['contact']['photo'],
- '$url' => ($a->data['contact']['network'] == 'dfrn') ? $a->get_baseurl()."/redir/".$a->data['contact']['id'] : $a->data['contact']['url']
+ '$url' => ($a->data['contact']['network'] == NETWORK_DFRN) ? $a->get_baseurl()."/redir/".$a->data['contact']['id'] : $a->data['contact']['url']
));
$follow_widget = '';
}
default:
break;
}
- if(($rr['network'] === 'dfrn') && ($rr['rel'])) {
+ if(($rr['network'] === NETWORK_DFRN) && ($rr['rel'])) {
$url = "redir/{$rr['id']}";
$sparkle = ' class="sparkle" ';
}
`pending` = 0,
`duplex` = %d,
`hidden` = %d,
- `network` = 'dfrn' WHERE `id` = %d
+ `network` = '%s' WHERE `id` = %d
",
dbesc($photos[0]),
dbesc($photos[1]),
dbesc(datetime_convert()),
intval($duplex),
intval($hidden),
+ dbesc(NETWORK_DFRN),
intval($contact_id)
);
}
if(local_user() && ($item['contact-uid'] == local_user())
- && ($item['network'] == 'dfrn') && (! $item['self'] )) {
+ && ($item['network'] == NETWORK_DFRN) && (! $item['self'] )) {
$profile_url = $redirect_url;
$sparkle = ' sparkle';
}
if(($a->argc > 2) && intval($a->argv[1]) && intval($a->argv[2])) {
$r = q("SELECT `id` FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `self` = 0
- AND `network` = 'dfrn' AND `id` = %d AND `uid` = %d LIMIT 1",
+ AND `network` = '%s' AND `id` = %d AND `uid` = %d LIMIT 1",
+ dbesc(NETWORK_DFRN),
intval($a->argv[2]),
intval(local_user())
);
$o .= '<h3>' . t("All Contacts \x28with secure profile access\x29") . '</h3>';
$o .= '</div>';
$o .= '<div id="prof-all-contacts">';
-
- $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0 and `pending` = 0 and `self` = 0
- AND `network` = 'dfrn' ORDER BY `name` ASC",
- intval(local_user())
+
+ $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0 and `pending` = 0 and `self` = 0
+ AND `network` = '%s' ORDER BY `name` ASC",
+ intval(local_user()),
+ dbesc(NETWORK_DFRN)
);
if(count($r)) {