* InfoLog: new config for copying or creating sub-entries to exclude just attachments (was links including attachments and links to other apps), fixed deleting attachments in copys/subs before storing them, deleted original attachment

This commit is contained in:
Ralf Becker 2012-03-22 15:33:20 +00:00
parent 5f284abfdc
commit 92ddbf9a6d
3 changed files with 25 additions and 10 deletions

View File

@ -2016,18 +2016,20 @@ class infolog_ui
$content['link_to']['to_app'] = 'infolog';
$content['link_to']['to_id'] = 0;
// Get links to be copied, if not excluded
if (!in_array('link_to',$exclude_fields))
if (!in_array('link_to',$exclude_fields) || !in_array('attachments',$exclude_fields))
{
$content['link_to']['to_id'] = egw_link::get_links($content['link_to']['to_app'], $info_id);
// Special mangling for files so the files get copied
foreach($content['link_to']['to_id'] as $link_id => &$link)
foreach(egw_link::get_links($content['link_to']['to_app'], $info_id) as $link_id => $link)
{
if ($link['app'] == egw_link::VFS_APPNAME)
if ($link['app'] != egw_link::VFS_APPNAME && !in_array('link_to', $exclude_fields))
{
$link['id'] = $link + array(
egw_link::link('infolog', $content['link_to']['to_id'], $link['app'], $link['id'], $link['remark']);
}
elseif ($link['app'] == egw_link::VFS_APPNAME && !in_array('attachments', $exclude_fields))
{
egw_link::link('infolog', $content['link_to']['to_id'], egw_link::VFS_APPNAME, array(
'tmp_name' => egw_link::vfs_path($link['app2'], $link['id2']).'/'.$link['id'],
'name' => $link['id'],
);
), $link['remark']);
}
}
}
@ -2115,7 +2117,7 @@ class infolog_ui
*/
function admin( )
{
$fields = $excludefields = array(
$fields = array(
'info_cat' => 'Category',
'info_from' => 'Contact',
'info_addr' => 'Phone/Email',
@ -2127,7 +2129,18 @@ class infolog_ui
'info_planned_time' => 'Planned time',
'info_used_time' => 'Used time',
);
$excludefields = array_merge($excludefields,array(
$excludefields = array(
'info_cat' => 'Category',
'info_from' => 'Contact',
'info_addr' => 'Phone/Email',
'info_subject' => 'Subject',
'info_des' => 'Description',
'link_to' => 'Links',
'attachments' => 'Attachments',
'info_priority' => 'Priority',
'info_location' => 'Location',
'info_planned_time' => 'Planned time',
'info_used_time' => 'Used time',
'info_type' => 'Type',
'info_owner' => 'Owner',
'info_responsible' => 'Responsible',
@ -2144,7 +2157,7 @@ class infolog_ui
'info_custom_from' => 'from',
'info_replanned_time' => 're-planned time',
'info_cc' => 'CC',
));
);
// add customfields to field list
foreach(config::get_customfields('infolog') as $name => $data)
{

View File

@ -56,6 +56,7 @@ archive infolog de Archiviert
are you shure you want to close this entry ? infolog de Wollen Sie wirklich den Infolog schliessen?
attach a file infolog de Datei anhängen
attach file infolog de Datei anhängen
attachments infolog de angehangene Dateien
attention: no contact with address %1 found. infolog de Achtung: Kein Kontakt mit der Adresse %1 gefunden!
back to main list infolog de Zurück zur Gesamtliste
billed infolog de abgerechnet

View File

@ -56,6 +56,7 @@ archive infolog en Archive
are you shure you want to close this entry ? infolog en Are you sure you want to close this entry ?
attach a file infolog en Attach a file
attach file infolog en Attach file
attachments infolog en Attachments
attention: no contact with address %1 found. infolog en Attention: No contact with address %1 found.
back to main list infolog en Back to main list
billed infolog en Billed