added spaces + some curly braces
Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
d529125c8e
commit
ed0d858f98
6 changed files with 27 additions and 18 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue