mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
Fix wrong variable names
This commit is contained in:
parent
87ee0f0088
commit
7ee16e78b3
@ -137,8 +137,8 @@ class timesheet_import_csv implements importexport_iface_import_plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// set Owner
|
// set Owner
|
||||||
$_definition->plugin_options['creator'] = isset( $_definition->plugin_options['creator'] ) ?
|
$_definition->plugin_options['record_owner'] = isset( $_definition->plugin_options['record_owner'] ) ?
|
||||||
$_definition->plugin_options['creator'] : $this->user;
|
$_definition->plugin_options['record_owner'] : $this->user;
|
||||||
|
|
||||||
// Used to try to automatically match names to account IDs
|
// Used to try to automatically match names to account IDs
|
||||||
$addressbook = new addressbook_so();
|
$addressbook = new addressbook_so();
|
||||||
@ -227,16 +227,16 @@ class timesheet_import_csv implements importexport_iface_import_plugin {
|
|||||||
$this->errors[$import_csv->get_current_position()] = lang(
|
$this->errors[$import_csv->get_current_position()] = lang(
|
||||||
'Unable to convert "%1" to account ID. Using plugin setting (%2) for %3.',
|
'Unable to convert "%1" to account ID. Using plugin setting (%2) for %3.',
|
||||||
$record['ts_owner'],
|
$record['ts_owner'],
|
||||||
common::grab_owner_name($_definition->plugin_options['creator']),
|
common::grab_owner_name($_definition->plugin_options['record_owner']),
|
||||||
lang($this->bo->field2label['ts_owner'])
|
lang($this->bo->field2label['ts_owner'])
|
||||||
);
|
);
|
||||||
$record['ts_owner'] = $_definition->plugin_options['creator'];
|
$record['ts_owner'] = $_definition->plugin_options['record_owner'];
|
||||||
} else {
|
} else {
|
||||||
$record['ts_owner'] = $new_owner;
|
$record['ts_owner'] = $new_owner;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ($_definition->plugin_options['creator']) {
|
} elseif ($_definition->plugin_options['record_owner']) {
|
||||||
$record['ts_owner'] = $_definition->plugin_options['creator'];
|
$record['ts_owner'] = $_definition->plugin_options['record_owner'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check account IDs
|
// Check account IDs
|
||||||
@ -250,7 +250,7 @@ class timesheet_import_csv implements importexport_iface_import_plugin {
|
|||||||
$this->errors[$import_csv->get_current_position()] = lang(
|
$this->errors[$import_csv->get_current_position()] = lang(
|
||||||
'Unable to convert "%1" to account ID. Using plugin setting (%2) for %3.',
|
'Unable to convert "%1" to account ID. Using plugin setting (%2) for %3.',
|
||||||
$record[$field],
|
$record[$field],
|
||||||
common::grab_owner_name($_definition->plugin_options['creator']),
|
common::grab_owner_name($_definition->plugin_options['record_owner']),
|
||||||
$this->bo->field2label[$field] ? lang($this->bo->field2label[$field]) : $field
|
$this->bo->field2label[$field] ? lang($this->bo->field2label[$field]) : $field
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -331,7 +331,7 @@ class timesheet_import_csv implements importexport_iface_import_plugin {
|
|||||||
// Only update if there are changes
|
// Only update if there are changes
|
||||||
$old = $this->bo->read($_data['ts_id']);
|
$old = $this->bo->read($_data['ts_id']);
|
||||||
|
|
||||||
if(!$this->definition->plugin_options['change_creator']) {
|
if(!$this->definition->plugin_options['change_owner']) {
|
||||||
// Don't change creator of an existing ticket
|
// Don't change creator of an existing ticket
|
||||||
unset($_data['ts_owner']);
|
unset($_data['ts_owner']);
|
||||||
}
|
}
|
||||||
|
@ -159,21 +159,21 @@ class timesheet_wizard_import_csv extends importexport_wizard_basic_import_csv
|
|||||||
{
|
{
|
||||||
$content['msg'] = $this->steps['wizard_step60'];
|
$content['msg'] = $this->steps['wizard_step60'];
|
||||||
$content['step'] = 'wizard_step60';
|
$content['step'] = 'wizard_step60';
|
||||||
if(!array_key_exists($content['creator']) && $content['plugin_options']) {
|
$preserv = $content;
|
||||||
$content['creator'] = $content['plugin_options']['creator'];
|
if(!array_key_exists($content['record_owner']) && $content['plugin_options']) {
|
||||||
|
$content['record_owner'] = $content['plugin_options']['record_owner'];
|
||||||
}
|
}
|
||||||
if(!array_key_exists($content['creator_from_csv']) && $content['plugin_options']) {
|
if(!array_key_exists($content['owner_from_csv']) && $content['plugin_options']) {
|
||||||
$content['creator_from_csv'] = $content['plugin_options']['creator_from_csv'];
|
$content['owner_from_csv'] = $content['plugin_options']['owner_from_csv'];
|
||||||
}
|
}
|
||||||
if(!array_key_exists($content['change_creator']) && $content['plugin_options']) {
|
if(!array_key_exists($content['change_owner']) && $content['plugin_options']) {
|
||||||
$content['change_creator'] = $content['plugin_options']['change_creator'];
|
$content['change_owner'] = $content['plugin_options']['change_owner'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!in_array('ts_owner', $content['field_mapping'])) {
|
if(!in_array('ts_owner', $content['field_mapping'])) {
|
||||||
$content['no_owner_map'] = true;
|
$content['no_owner_map'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$preserv = $content;
|
|
||||||
unset ($preserv['button']);
|
unset ($preserv['button']);
|
||||||
return 'infolog.importexport_wizard_chooseowner';
|
return 'infolog.importexport_wizard_chooseowner';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user