]> git.mxchange.org Git - friendica.git/commitdiff
added spaces + curly braces
authorRoland Häder <roland@mxchange.org>
Tue, 20 Dec 2016 10:38:16 +0000 (11:38 +0100)
committerRoland Häder <roland@mxchange.org>
Tue, 20 Dec 2016 10:38:33 +0000 (11:38 +0100)
Signed-off-by: Roland Häder <roland@mxchange.org>
include/conversation.php
include/email.php
include/socgraph.php
include/text.php
mod/randprof.php

index 916a9e229e4bac1190889e5385087ed49e842cc0..ccfc070d4e2d416be818e142fa65a73486cfb8b6 100644 (file)
@@ -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'];
+               }
        }
 
 
index 2c05d3233fd4786b0e81eb1e789f444ec1776030..42f80c24273e2c6d4aaf1c894259504ab0fbf49b 100644 (file)
@@ -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;
        }
index 3fe1227f313c46037a6b2b2b2d8e519c97c0b536..a779e88effb53bdbfd2988e300aca5682914c1a2 100644 (file)
@@ -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');
+                                       }
                                }
                        }
                }
index 59d4e1cc9fe290fb7d2c7b93a3e21b396fc58d4d..8d3b6a8050199ec5ec4d78ea0982af902e3a2316 100644 (file)
@@ -1367,7 +1367,7 @@ function prepare_body(&$item,$attach = false, $preview = false) {
        // map
        if(strpos($s,'<div class="map">') !== false && $item['coord']) {
                $x = generate_map(trim($item['coord']));
-               if($x) {
+               if ($x) {
                        $s = preg_replace('/\<div class\=\"map\"\>/','$0' . $x,$s);
                }
        }
index bf9fa34256bde995a4f267bf3c9081ffa18616d8..08157a3851a40ff8bba7723112498a817c90de21 100644 (file)
@@ -3,8 +3,12 @@
 
 function randprof_init(App &$a) {
        require_once('include/Contact.php');
+
        $x = random_profile();
-       if($x)
+
+       if ($x) {
                goaway(zrl($x));
+       }
+
        goaway(App::get_baseurl() . '/profile');
 }