// 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'];
+ }
}
$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']);
$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']);
$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;
}
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');
+ }
}
}
}
// 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);
}
}
function randprof_init(&$a) {
require_once('include/Contact.php');
+
$x = random_profile();
- if($x)
+
+ if ($x) {
goaway(zrl($x));
+ }
+
goaway(App::get_baseurl() . '/profile');
}