mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 09:53:20 +01:00
fix for a sometime not terminating loop. patch provided by knut moeller
This commit is contained in:
parent
b8f54d1408
commit
aee25f82df
@ -257,17 +257,27 @@ class bolink extends solink
|
||||
$only_app = substr(1,$only_app);
|
||||
}
|
||||
end($id);
|
||||
while ($link = current($id))
|
||||
foreach (array_reverse($id) as $link) {
|
||||
if (is_array($link) // check for unlink-marker
|
||||
&& !($only_app && $not_only == ($link['app'] == $only_app)))
|
||||
{
|
||||
if (!is_array($link) || // check for unlink-marker
|
||||
$only_app && $not_only == ($link['app'] == $only_app))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$ids[$link['link_id']] = $only_app ? $link['id'] : $link;
|
||||
prev($id);
|
||||
}
|
||||
}
|
||||
# the old version of the foreach from above
|
||||
# left here for reference. can be deleted later
|
||||
#
|
||||
#while ($link = current($id))
|
||||
#{
|
||||
# if (!is_array($link) || // check for unlink-marker
|
||||
# $only_app && $not_only == ($link['app'] == $only_app))
|
||||
# {
|
||||
# continue;
|
||||
# }
|
||||
# $ids[$link['link_id']] = $only_app ? $link['id'] : $link;
|
||||
# prev($id);
|
||||
#}
|
||||
}
|
||||
return $ids;
|
||||
}
|
||||
$ids = solink::get_links($app,$id,$only_app,$order);
|
||||
|
Loading…
Reference in New Issue
Block a user