mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
only history-log and notify, if there were any links deleted
This commit is contained in:
parent
7cb135c43e
commit
6b13b909ff
@ -735,16 +735,17 @@ class Link extends Link\Storage
|
|||||||
$app2 = $link['link_app2'];
|
$app2 = $link['link_app2'];
|
||||||
$id2 = $link['link_id2'];
|
$id2 = $link['link_id2'];
|
||||||
}
|
}
|
||||||
if ($app && $app2)
|
// only history-log and notify, if there were any links deleted
|
||||||
|
if (($deleted = Link\Storage::unlink($link_id,$app,$id,$owner,$app2 != '!'.self::VFS_APPNAME ? $app2 : '',$id2,$hold_for_purge)))
|
||||||
{
|
{
|
||||||
Storage\History::static_add($app,$id,$GLOBALS['egw_info']['user']['account_id'],'~link~','',$app2.':'.$id2);
|
if ($app && $app2)
|
||||||
Storage\History::static_add($app2,$id2,$GLOBALS['egw_info']['user']['account_id'],'~link~','',$app.':'.$id);
|
{
|
||||||
|
Storage\History::static_add($app,$id,$GLOBALS['egw_info']['user']['account_id'],'~link~','',$app2.':'.$id2);
|
||||||
|
Storage\History::static_add($app2,$id2,$GLOBALS['egw_info']['user']['account_id'],'~link~','',$app.':'.$id);
|
||||||
|
}
|
||||||
|
// only notify on real links, not the one cached for writing or fileattachments
|
||||||
|
self::notify_unlink($deleted);
|
||||||
}
|
}
|
||||||
$deleted = Link\Storage::unlink($link_id,$app,$id,$owner,$app2 != '!'.self::VFS_APPNAME ? $app2 : '',$id2,$hold_for_purge);
|
|
||||||
|
|
||||||
// only notify on real links, not the one cached for writing or fileattachments
|
|
||||||
self::notify_unlink($deleted);
|
|
||||||
|
|
||||||
return count($deleted);
|
return count($deleted);
|
||||||
}
|
}
|
||||||
if (!$link_id) $link_id = self::temp_link_id($app2,$id2); // create link_id of temporary link, if not given
|
if (!$link_id) $link_id = self::temp_link_id($app2,$id2); // create link_id of temporary link, if not given
|
||||||
|
Loading…
Reference in New Issue
Block a user