added spaces + some curly braces
Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
d529125c8e
commit
ed0d858f98
|
@ -172,10 +172,11 @@ function categories_widget($baseurl,$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' : ''));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -309,8 +309,9 @@ function localize_item(&$item){
|
|||
$matches = null;
|
||||
if (preg_match_all('/@\[url=(.*?)\]/is',$item['body'],$matches,PREG_SET_ORDER)) {
|
||||
foreach ($matches as $mtch) {
|
||||
if (! strpos($mtch[1],'zrl='))
|
||||
if (! strpos($mtch[1],'zrl=')) {
|
||||
$item['body'] = str_replace($mtch[0],'@[url=' . zrl($mtch[1]). ']',$item['body']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1360,20 +1361,25 @@ function conv_sort($arr,$order) {
|
|||
|
||||
$arr = $newarr;
|
||||
|
||||
foreach ($arr as $x)
|
||||
if ($x['id'] == $x['parent'])
|
||||
$parents[] = $x;
|
||||
foreach ($arr as $x) {
|
||||
if ($x['id'] == $x['parent']) {
|
||||
$parents[] = $x;
|
||||
}
|
||||
}
|
||||
|
||||
if (stristr($order,'created'))
|
||||
if (stristr($order,'created')) {
|
||||
usort($parents,'sort_thr_created');
|
||||
elseif (stristr($order,'commented'))
|
||||
} elseif (stristr($order,'commented')) {
|
||||
usort($parents,'sort_thr_commented');
|
||||
}
|
||||
|
||||
if (count($parents))
|
||||
foreach ($parents as $i=>$_x)
|
||||
if (count($parents)) {
|
||||
foreach($parents as $i=>$_x) {
|
||||
$parents[$i]['children'] = get_item_children($arr, $_x);
|
||||
}
|
||||
}
|
||||
|
||||
/*foreach ($arr as $x) {
|
||||
/*foreach($arr as $x) {
|
||||
if ($x['id'] != $x['parent']) {
|
||||
$p = find_thread_parent_index($parents,$x);
|
||||
if ($p !== false)
|
||||
|
|
|
@ -1277,7 +1277,7 @@ class dfrn {
|
|||
$href = "";
|
||||
$width = 0;
|
||||
foreach ($avatar->attributes AS $attributes) {
|
||||
/// @TODO Rewrite these similar if() to one switch
|
||||
/// @TODO Rewrite these similar if () to one switch
|
||||
if ($attributes->name == "href") {
|
||||
$href = $attributes->textContent;
|
||||
}
|
||||
|
@ -2122,7 +2122,7 @@ class dfrn {
|
|||
$title = "";
|
||||
foreach ($links AS $link) {
|
||||
foreach ($link->attributes AS $attributes) {
|
||||
/// @TODO Rewrite these repeated (same) if() statements to a switch()
|
||||
/// @TODO Rewrite these repeated (same) if () statements to a switch()
|
||||
if ($attributes->name == "href") {
|
||||
$href = $attributes->textContent;
|
||||
}
|
||||
|
|
|
@ -1138,7 +1138,7 @@ class ostatus {
|
|||
continue;
|
||||
}
|
||||
|
||||
/// @TODO One statment is okay (until if() )
|
||||
/// @TODO One statment is okay (until if () )
|
||||
$arr = array();
|
||||
$arr["network"] = $details["network"];
|
||||
$arr["uri"] = $single_conv->id;
|
||||
|
|
|
@ -358,8 +358,9 @@ function item_permissions_sql($owner_id,$remote_verified = false,$groups = null)
|
|||
$gs = '<<>>'; // should be impossible to match
|
||||
|
||||
if (is_array($groups) && count($groups)) {
|
||||
foreach ($groups as $g)
|
||||
foreach ($groups as $g) {
|
||||
$gs .= '|<' . intval($g) . '>';
|
||||
}
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
|
|
|
@ -421,8 +421,9 @@ function expand_acl($s) {
|
|||
$t = str_replace('<','',$s);
|
||||
$a = explode('>',$t);
|
||||
foreach ($a as $aa) {
|
||||
if (intval($aa))
|
||||
if (intval($aa)) {
|
||||
$ret[] = intval($aa);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
|
|
Loading…
Reference in New Issue
Block a user