mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
When deleting but keeping infolog entries, hold on to links as well so they can be restored if contact is restored
This commit is contained in:
parent
2b13b73b60
commit
8be41b7976
@ -626,7 +626,7 @@ class infolog_bo
|
|||||||
|
|
||||||
$this->so->write($deleted);
|
$this->so->write($deleted);
|
||||||
|
|
||||||
egw_link::unlink(0,'infolog',$info_id,'','!file'); // keep the file attachments, only delete the rest
|
egw_link::unlink(0,'infolog',$info_id,'','!file','',true); // keep the file attachments, hide the rest
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -875,6 +875,12 @@ class infolog_bo
|
|||||||
// create (and remove) links in custom fields
|
// create (and remove) links in custom fields
|
||||||
customfields_widget::update_customfield_links('infolog',$values,$old,'info_id');
|
customfields_widget::update_customfield_links('infolog',$values,$old,'info_id');
|
||||||
|
|
||||||
|
// Check for restore of deleted entry, restore held links
|
||||||
|
if($old['info_status'] == 'deleted' && $values['info_status'] != 'deleted')
|
||||||
|
{
|
||||||
|
egw_link::restore('infolog', $info_id);
|
||||||
|
}
|
||||||
|
|
||||||
// notify the link-class about the update, as other apps may be subscribt to it
|
// notify the link-class about the update, as other apps may be subscribt to it
|
||||||
egw_link::notify_update('infolog',$info_id,$values);
|
egw_link::notify_update('infolog',$info_id,$values);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user