fixed not working storing of sub_excludefields and translations

This commit is contained in:
Ralf Becker 2012-02-24 10:01:40 +00:00
parent ec694d4a4f
commit 3015287833
3 changed files with 17 additions and 10 deletions

View File

@ -2169,11 +2169,18 @@ class infolog_ui
$this->bo->responsible_edit = array_merge($this->bo->responsible_edit,$extra);
}
// some fields like id, uid, created, createdby, modified and modifiedby are excluded by default
$this->bo->copy_excludefields = array('info_id', 'info_uid', 'info_etag', 'caldav_name', 'info_created', 'info_creator', 'info_datemodified', 'info_modifier');
if ($_POST['copy_excludefields'])
foreach(array('copy_excludefields','sub_excludefields') as $name)
{
$extra = array_intersect((array)$_POST['copy_excludefields'],array_keys($excludefields));
$this->bo->copy_excludefields = array_merge($this->bo->copy_excludefields,$extra);
$efs = array_keys($name == 'sub_excludefields' ? $sub_excludefields : $excludefields);
$this->bo->$name = array_diff($this->bo->$name, $efs); // restore default from bo
if ($_POST[$name])
{
if ($name == 'sub_excludefields') // remove default info_des, to be able to unselect it!
{
$this->bo->sub_excludefields = array_diff($this->bo->sub_excludefields,array('info_des'));
}
$this->bo->$name = array_merge($this->bo->$name, array_intersect((array)$_POST[$name], $efs));
}
}
config::save_value('copy_excludefields',$this->bo->copy_excludefields,'infolog');
config::save_value('sub_excludefields',$this->bo->sub_excludefields,'infolog');
@ -2203,11 +2210,9 @@ class infolog_ui
)),
'lang_responsible_edit' => lang('Which additional fields should the responsible be allowed to edit without having edit rights?<br />Status, percent and date completed are always allowed.'),
'responsible_edit' => html::checkbox_multiselect('responsible_edit',$this->bo->responsible_edit,$fields,false,'',6),
'lang_copy_excludefields' => lang('Fields to exclude when copying an infolog:').'<p>'.
lang('Fields id, uid, created, createdby, modified and modifier are always excluded.'),
'lang_copy_excludefields' => lang('Fields to exclude when copying an infolog:'),
'copy_excludefields' => html::checkbox_multiselect('copy_excludefields',$this->bo->copy_excludefields,$excludefields,false,'',6),
'lang_sub_excludefields' => lang('Fields to exclude when creating a sub-entry:').'<p>'.
lang('Fields id, uid, created, createdby, modified and modifier are always excluded.'),
'lang_sub_excludefields' => lang('Fields to exclude when creating a sub-entry:'),
'sub_excludefields' => html::checkbox_multiselect('sub_excludefields',$this->bo->sub_excludefields,$sub_excludefields,false,'',6),
'text' => lang('<b>file-attachments via symlinks</b> instead of uploads and retrieval via file:/path for direct lan-clients'),
'action_url' => html::link('/index.php',array('menuaction'=>'infolog.infolog_ui.admin')),

View File

@ -183,7 +183,8 @@ exists infolog de Besteht
exports infolog entries into a csv file. infolog de Exportiert Infolog Einträge in einen CSV Datei.
fax infolog de Fax
field must not be empty !!! infolog de Feld darf nicht leer sein !!!
fields to exclude from copy when copying an infolog? (some fields like id, uid, created, createdby, modified and modifiedby are excluded by default) infolog de Welche felder wollen Sie zurücksetzen, wenn Sie einen Infologeintrag kopieren? (bestimmte Felder werden - aus technischen Erwägungen heraus - während des Kopiervorgangs immer zurückgesetzt. Bsp.: ID, Uid, Erstellt, Erstellt von, Geändert und Geändert von)
fields to exclude when copying an infolog: infolog de Felder die ausgeschlossen werden beim Kopieren eines InfoLogs:
fields to exclude when creating a sub-entry: infolog de Felder die ausgeschlossen werden beim Erstellen eines Untereintrags:
fieldseparator infolog de Feldbegrenzer
finish infolog de wenn erledigt
first argument for preg_replace infolog de Ersten Argument für pre_replace

View File

@ -183,7 +183,8 @@ exists infolog en Exists
exports infolog entries into a csv file. infolog en Exports InfoLog entries into a CSV file.
fax infolog en Fax
field must not be empty !!! infolog en Field must not be empty!
fields to exclude from copy when copying an infolog? (some fields like id, uid, created, createdby, modified and modifiedby are excluded by default) infolog en Fields to exclude from copy when copying an infolog? (some fields like id, uid, created, createdby, modified and modifiedby are excluded by default)
fields to exclude when copying an infolog: infolog en Fields to exclude when copying an infolog:
fields to exclude when creating a sub-entry: infolog en Fields to exclude when creating a sub-entry:
fieldseparator infolog en Field separator
finish infolog en Finish
first argument for preg_replace infolog en First argument for preg_replace