From 7ee16e78b3041755c2e873ea453dd598d27c6d15 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 5 Apr 2011 22:57:06 +0000 Subject: [PATCH] Fix wrong variable names --- timesheet/inc/class.timesheet_import_csv.inc.php | 16 ++++++++-------- .../class.timesheet_wizard_import_csv.inc.php | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/timesheet/inc/class.timesheet_import_csv.inc.php b/timesheet/inc/class.timesheet_import_csv.inc.php index 3b5114e131..c137b04dc4 100644 --- a/timesheet/inc/class.timesheet_import_csv.inc.php +++ b/timesheet/inc/class.timesheet_import_csv.inc.php @@ -137,8 +137,8 @@ class timesheet_import_csv implements importexport_iface_import_plugin { } // set Owner - $_definition->plugin_options['creator'] = isset( $_definition->plugin_options['creator'] ) ? - $_definition->plugin_options['creator'] : $this->user; + $_definition->plugin_options['record_owner'] = isset( $_definition->plugin_options['record_owner'] ) ? + $_definition->plugin_options['record_owner'] : $this->user; // Used to try to automatically match names to account IDs $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( 'Unable to convert "%1" to account ID. Using plugin setting (%2) for %3.', $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']) ); - $record['ts_owner'] = $_definition->plugin_options['creator']; + $record['ts_owner'] = $_definition->plugin_options['record_owner']; } else { $record['ts_owner'] = $new_owner; } } - } elseif ($_definition->plugin_options['creator']) { - $record['ts_owner'] = $_definition->plugin_options['creator']; + } elseif ($_definition->plugin_options['record_owner']) { + $record['ts_owner'] = $_definition->plugin_options['record_owner']; } // Check account IDs @@ -250,7 +250,7 @@ class timesheet_import_csv implements importexport_iface_import_plugin { $this->errors[$import_csv->get_current_position()] = lang( 'Unable to convert "%1" to account ID. Using plugin setting (%2) for %3.', $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 ); } @@ -331,7 +331,7 @@ class timesheet_import_csv implements importexport_iface_import_plugin { // Only update if there are changes $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 unset($_data['ts_owner']); } diff --git a/timesheet/inc/class.timesheet_wizard_import_csv.inc.php b/timesheet/inc/class.timesheet_wizard_import_csv.inc.php index 3c25228f76..fcdbcf3817 100644 --- a/timesheet/inc/class.timesheet_wizard_import_csv.inc.php +++ b/timesheet/inc/class.timesheet_wizard_import_csv.inc.php @@ -159,21 +159,21 @@ class timesheet_wizard_import_csv extends importexport_wizard_basic_import_csv { $content['msg'] = $this->steps['wizard_step60']; $content['step'] = 'wizard_step60'; - if(!array_key_exists($content['creator']) && $content['plugin_options']) { - $content['creator'] = $content['plugin_options']['creator']; + $preserv = $content; + 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']) { - $content['creator_from_csv'] = $content['plugin_options']['creator_from_csv']; + if(!array_key_exists($content['owner_from_csv']) && $content['plugin_options']) { + $content['owner_from_csv'] = $content['plugin_options']['owner_from_csv']; } - if(!array_key_exists($content['change_creator']) && $content['plugin_options']) { - $content['change_creator'] = $content['plugin_options']['change_creator']; + if(!array_key_exists($content['change_owner']) && $content['plugin_options']) { + $content['change_owner'] = $content['plugin_options']['change_owner']; } if(!in_array('ts_owner', $content['field_mapping'])) { $content['no_owner_map'] = true; } - $preserv = $content; unset ($preserv['button']); return 'infolog.importexport_wizard_chooseowner'; }