mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
small enhancement to keep the attachments, 'til the infolog entry gets finally deleted
This commit is contained in:
parent
3e34a63035
commit
04ba662494
@ -540,15 +540,17 @@ class boinfolog
|
||||
if ($info['info_status'] == 'deleted') return false; // entry already deleted
|
||||
|
||||
$this->so->write($deleted);
|
||||
|
||||
$this->link->unlink(0,'infolog',$info_id,'','!file'); // keep the file attachments, only delete the rest
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->so->delete($info_id,false); // we delete the children via bo to get all notifications!
|
||||
|
||||
$this->link->unlink(0,'infolog',$info_id);
|
||||
}
|
||||
if ($info['info_status'] != 'deleted') // dont notify of final purge of already deleted items
|
||||
{
|
||||
$this->link->unlink(0,'infolog',$info_id);
|
||||
|
||||
$GLOBALS['egw']->contenthistory->updateTimeStamp('infolog_'.$info['info_type'], $info_id, 'delete', time());
|
||||
|
||||
// send email notifications and do the history logging
|
||||
|
@ -357,7 +357,7 @@ class bolink extends solink
|
||||
* @param $link_id link-id to remove if > 0
|
||||
* @param string $app='' appname of first endpoint
|
||||
* @param string/array &$id='' id in $app or array with links, if 1. entry not yet created
|
||||
* @param string $app2='' app of second endpoint
|
||||
* @param string $app2='' app of second endpoint, or !file (other !app are not yet supported!)
|
||||
* @param string $id2='' id in $app2
|
||||
* @return the number of links deleted
|
||||
*/
|
||||
@ -381,12 +381,12 @@ class bolink extends solink
|
||||
}
|
||||
if (!is_array($id))
|
||||
{
|
||||
if (!$link_id && !$app2 && !$id2)
|
||||
if (!$link_id && !$app2 && !$id2 && $app2 != '!'.$this->vfs_appname)
|
||||
{
|
||||
$this->delete_attached($app,$id); // deleting all attachments
|
||||
unset($this->title_cache[$app.':'.$id]);
|
||||
}
|
||||
$deleted =& solink::unlink($link_id,$app,$id,$owner,$app2,$id2);
|
||||
$deleted =& solink::unlink($link_id,$app,$id,$owner,$app2 != '!'.$this->vfs_appname ? $app2 : '',$id2);
|
||||
|
||||
// only notify on real links, not the one cached for writing or fileattachments
|
||||
$this->notify_unlink($deleted);
|
||||
|
Loading…
Reference in New Issue
Block a user