From fc9dbc0899aed223378be677356cd74e722dfd14 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 20 Dec 2016 11:38:16 +0100 Subject: [PATCH] added spaces + curly braces MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- include/conversation.php | 6 ++++-- include/email.php | 19 +++++++++++++------ include/socgraph.php | 7 ++++--- include/text.php | 2 +- mod/randprof.php | 6 +++++- 5 files changed, 27 insertions(+), 13 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 916a9e229e..ccfc070d4e 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -324,11 +324,13 @@ function localize_item(&$item){ // add sparkle links to appropriate permalinks $x = stristr($item['plink'],'/display/'); - if($x) { + if ($x) { $sparkle = false; $y = best_link_url($item,$sparkle,true); - if(strstr($y,'/redir/')) + + if (strstr($y,'/redir/')) { $item['plink'] = $y . '?f=&url=' . $item['plink']; + } } diff --git a/include/email.php b/include/email.php index 2c05d3233f..42f80c2427 100644 --- a/include/email.php +++ b/include/email.php @@ -96,15 +96,20 @@ function email_get_msg($mbox,$uid, $reply) { $html = ''; foreach($struc->parts as $ptop => $p) { $x = email_get_part($mbox,$uid,$p,$ptop + 1, 'plain'); - if($x) $text .= $x; + if ($x) { + $text .= $x; + } $x = email_get_part($mbox,$uid,$p,$ptop + 1, 'html'); - if($x) $html .= $x; + if ($x) { + $html .= $x; + } } - if (trim($html) != '') + if (trim($html) != '') { $ret['body'] = html2bbcode($html); - else + } else { $ret['body'] = $text; + } } $ret['body'] = removegpg($ret['body']); @@ -112,8 +117,9 @@ function email_get_msg($mbox,$uid, $reply) { $ret['body'] = $msg['body']; $ret['body'] = convertquote($ret['body'], $reply); - if (trim($html) != '') + if (trim($html) != '') { $ret['body'] = removelinebreak($ret['body']); + } $ret['body'] = unifyattributionline($ret['body']); @@ -189,8 +195,9 @@ function email_get_part($mbox,$uid,$p,$partno, $subtype) { $x = ""; foreach ($p->parts as $partno0=>$p2) { $x .= email_get_part($mbox,$uid,$p2,$partno . '.' . ($partno0+1), $subtype); // 1.2, 1.2.1, etc. - //if($x) + //if ($x) { // return $x; + //} } return $x; } diff --git a/include/socgraph.php b/include/socgraph.php index 6e53f2ae72..5960764f9e 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -1188,16 +1188,17 @@ function update_suggestions() { if(strlen(get_config('system','directory'))) { $x = fetch_url(get_server()."/pubsites"); - if($x) { + if ($x) { $j = json_decode($x); - if($j->entries) { + if ($j->entries) { foreach($j->entries as $entry) { poco_check_server($entry->url); $url = $entry->url . '/poco'; - if(! in_array($url,$done)) + if (! in_array($url,$done)) { poco_load(0,0,0,$entry->url . '/poco'); + } } } } diff --git a/include/text.php b/include/text.php index 05801d024c..e174aa3753 100644 --- a/include/text.php +++ b/include/text.php @@ -1367,7 +1367,7 @@ function prepare_body(&$item,$attach = false, $preview = false) { // map if(strpos($s,'
') !== false && $item['coord']) { $x = generate_map(trim($item['coord'])); - if($x) { + if ($x) { $s = preg_replace('/\
/','$0' . $x,$s); } } diff --git a/mod/randprof.php b/mod/randprof.php index 877bf818b9..b208eeef29 100644 --- a/mod/randprof.php +++ b/mod/randprof.php @@ -3,8 +3,12 @@ function randprof_init(&$a) { require_once('include/Contact.php'); + $x = random_profile(); - if($x) + + if ($x) { goaway(zrl($x)); + } + goaway(App::get_baseurl() . '/profile'); } -- 2.39.5