$a = get_app();
- if (get_config('system','invitation_only')) {
+ if(get_config('system','invitation_only')) {
$x = get_pconfig(local_user(),'system','invites_remaining');
- if ($x || is_site_admin()) {
+ if($x || is_site_admin()) {
$a->page['aside'] .= '<div class="side-link" id="side-invite-remain">'
. sprintf( tt('%d invitation available','%d invitations available',$x), $x)
. '</div>' . $inv;
}
}
- if (count($nets) < 2)
+ if(count($nets) < 2)
return '';
return replace_macros(get_markup_template('nets.tpl'),array(
$terms = array();
$cnt = preg_match_all('/\[(.*?)\]/',$saved,$matches,PREG_SET_ORDER);
if ($cnt) {
- foreach ($matches as $mtch) {
+ foreach($matches as $mtch) {
$unescaped = xmlify(file_tag_decode($mtch[1]));
$terms[] = array('name' => $unescaped,'selected' => (($selected == $unescaped) ? 'selected' : ''));
}
$matches = false;
$terms = array();
- $cnt = preg_match_all('/<(.*?)>/',$saved,$matches,PREG_SET_ORDER);
-
- if ($cnt) {
- foreach ($matches as $mtch) {
- $unescaped = xmlify(file_tag_decode($mtch[1]));
+ $cnt = preg_match_all('/<(.*?)>/',$saved,$matches,PREG_SET_ORDER);
+ if($cnt) {
+ foreach($matches as $mtch) {
+ $unescaped = xmlify(file_tag_decode($mtch[1]));
$terms[] = array('name' => $unescaped,'selected' => (($selected == $unescaped) ? 'selected' : ''));
}
}
$a = get_app();
- if (local_user() == $profile_uid)
+ if(local_user() == $profile_uid)
return;
$cid = $zcid = 0;
- if (is_array($_SESSION['remote'])) {
- foreach ($_SESSION['remote'] as $visitor) {
- if ($visitor['uid'] == $profile_uid) {
+ if(is_array($_SESSION['remote'])) {
+ foreach($_SESSION['remote'] as $visitor) {
+ if($visitor['uid'] == $profile_uid) {
$cid = $visitor['cid'];
break;
}
}
}
- if (! $cid) {
- if (get_my_url()) {
+ if(! $cid) {
+ if(get_my_url()) {
$r = q("select id from contact where nurl = '%s' and uid = %d limit 1",
dbesc(normalise_link(get_my_url())),
intval($profile_uid)
);
- if (dbm::is_result($r)) {
+ if (dbm::is_result($r))
$cid = $r[0]['id'];
- } else {
+ else {
$r = q("select id from gcontact where nurl = '%s' limit 1",
dbesc(normalise_link(get_my_url()))
);
}
}
- if ($cid == 0 && $zcid == 0) {
+ if($cid == 0 && $zcid == 0)
return;
- }
require_once('include/socgraph.php');
- if ($cid) {
+ if($cid)
$t = count_common_friends($profile_uid,$cid);
- } else {
+ else
$t = count_common_friends_zcid($profile_uid,$zcid);
- }
- if (! $t) {
+ if(! $t)
return;
- }
- if ($cid) {
+ if($cid)
$r = common_friends($profile_uid,$cid,0,5,true);
- } else {
+ else
$r = common_friends_zcid($profile_uid,$zcid,0,5,true);
- }
return replace_macros(get_markup_template('remote_friends_common.tpl'), array(
'$desc' => sprintf( tt("%d contact in common", "%d contacts in common", $t), $t),