added spaces + some curly braces

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2017-01-26 16:01:56 +01:00 committed by Roland Haeder
parent 0cd241bcbe
commit 41a36606c6
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
60 changed files with 1018 additions and 930 deletions

View file

@ -17,9 +17,9 @@ function findpeople_widget() {
$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;
@ -108,7 +108,7 @@ function networks_widget($baseurl,$selected = '') {
}
}
if(count($nets) < 2)
if (count($nets) < 2)
return '';
return replace_macros(get_markup_template('nets.tpl'),array(
@ -173,7 +173,7 @@ function categories_widget($baseurl,$selected = '') {
$matches = false;
$terms = array();
$cnt = preg_match_all('/<(.*?)>/',$saved,$matches,PREG_SET_ORDER);
if($cnt) {
if ($cnt) {
foreach($matches as $mtch) {
$unescaped = xmlify(file_tag_decode($mtch[1]));
$terms[] = array('name' => $unescaped,'selected' => (($selected == $unescaped) ? 'selected' : ''));
@ -195,29 +195,29 @@ function common_friends_visitor_widget($profile_uid) {
$a = get_app();
if(local_user() == $profile_uid)
if (local_user() == $profile_uid)
return;
$cid = $zcid = 0;
if(is_array($_SESSION['remote'])) {
if (is_array($_SESSION['remote'])) {
foreach($_SESSION['remote'] as $visitor) {
if($visitor['uid'] == $profile_uid) {
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()))
);
@ -227,22 +227,26 @@ function common_friends_visitor_widget($profile_uid) {
}
}
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),