mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 01:29:05 +01:00
check if we are already trying to unlink the entry, to avoid an infinit recursion
This commit is contained in:
parent
fc3fc728a4
commit
93b7e6885c
@ -738,7 +738,14 @@ class egw_link extends solink
|
|||||||
|
|
||||||
if ($id && is_null($title)) // $app,$id has been deleted ==> unlink all links to it
|
if ($id && is_null($title)) // $app,$id has been deleted ==> unlink all links to it
|
||||||
{
|
{
|
||||||
|
static $unlinking = array();
|
||||||
|
// check if we are already trying to unlink the entry, to avoid an infinit recursion
|
||||||
|
if (!isset($unlinking[$app]) || !isset($unlinking[$app][$id]))
|
||||||
|
{
|
||||||
|
$unlinking[$app][$id] = true;
|
||||||
self::unlink(0,$app,$id);
|
self::unlink(0,$app,$id);
|
||||||
|
unset($unlinking[$app][$id]);
|
||||||
|
}
|
||||||
if (self::DEBUG) echo '<p>'.__METHOD__."('$app','$id') unlinked, as $method returned null</p>\n";
|
if (self::DEBUG) echo '<p>'.__METHOD__."('$app','$id') unlinked, as $method returned null</p>\n";
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user