diff --git a/addressbook/inc/class.addressbook_import_contacts_csv.inc.php b/addressbook/inc/class.addressbook_import_contacts_csv.inc.php index e4fbd1826a..65231774c7 100644 --- a/addressbook/inc/class.addressbook_import_contacts_csv.inc.php +++ b/addressbook/inc/class.addressbook_import_contacts_csv.inc.php @@ -82,6 +82,11 @@ class addressbook_import_contacts_csv implements importexport_iface_import_plugi */ private $user = null; + /** + * List of import warnings + */ + protected $warnings = array(); + /** * List of import errors */ @@ -383,6 +388,18 @@ class addressbook_import_contacts_csv implements importexport_iface_import_plugi // lets do it! } + /** + * Returns warnings that were encountered during importing + * Maximum of one warning message per record, but you can append if you need to + * + * @return Array ( + * record_# => warning message + * ) + */ + public function get_warnings() { + return $this->warnings; + } + /** * Returns errors that were encountered during importing * Maximum of one error message per record, but you can append if you need to diff --git a/admin/inc/class.admin_import_groups_csv.inc.php b/admin/inc/class.admin_import_groups_csv.inc.php index 6d63dc38a5..b52687e408 100644 --- a/admin/inc/class.admin_import_groups_csv.inc.php +++ b/admin/inc/class.admin_import_groups_csv.inc.php @@ -58,6 +58,11 @@ class admin_import_groups_csv implements importexport_iface_import_plugin { */ private $dry_run = false; + /** + * List of import warnings + */ + protected $warnings = array(); + /** * List of import errors */ @@ -240,6 +245,18 @@ class admin_import_groups_csv implements importexport_iface_import_plugin { // lets do it! } + /** + * Returns warnings that were encountered during importing + * Maximum of one warning message per record, but you can concatenate them if you need to + * + * @return Array ( + * record_# => warning message + * ) + */ + public function get_warnings() { + return $this->warnings; + } + /** * Returns errors that were encountered during importing * Maximum of one error message per record, but you can append if you need to diff --git a/admin/inc/class.admin_import_users_csv.inc.php b/admin/inc/class.admin_import_users_csv.inc.php index dbfdec910e..3e9aceb57f 100644 --- a/admin/inc/class.admin_import_users_csv.inc.php +++ b/admin/inc/class.admin_import_users_csv.inc.php @@ -68,6 +68,11 @@ class admin_import_users_csv implements importexport_iface_import_plugin { */ private $user = null; + /** + * List of import warnings + */ + protected $warnings = array(); + /** * List of import errors */ @@ -258,6 +263,18 @@ class admin_import_users_csv implements importexport_iface_import_plugin { // lets do it! } + /** + * Returns warnings that were encountered during importing + * Maximum of one warning message per record, but you can concatenate them if you need to + * + * @return Array ( + * record_# => warning message + * ) + */ + public function get_warnings() { + return $this->warnings; + } + /** * Returns errors that were encountered during importing * Maximum of one error message per record, but you can append if you need to diff --git a/calendar/inc/class.calendar_import_csv.inc.php b/calendar/inc/class.calendar_import_csv.inc.php index 9fbaf72a97..5a07ae4419 100644 --- a/calendar/inc/class.calendar_import_csv.inc.php +++ b/calendar/inc/class.calendar_import_csv.inc.php @@ -86,6 +86,11 @@ class calendar_import_csv implements importexport_iface_import_plugin { */ private $user = null; + /** + * List of import warnings + */ + protected $warnings = array(); + /** * List of import errors */ @@ -363,6 +368,18 @@ class calendar_import_csv implements importexport_iface_import_plugin { // lets do it! } + /** + * Returns warnings that were encountered during importing + * Maximum of one warning message per record, but you can append if you need to + * + * @return Array ( + * record_# => warning message + * ) + */ + public function get_warnings() { + return $this->warnings; + } + /** * Returns errors that were encountered during importing * Maximum of one error message per record, but you can append if you need to diff --git a/calendar/inc/class.calendar_import_ical.inc.php b/calendar/inc/class.calendar_import_ical.inc.php index 89acab96dc..25392efac8 100644 --- a/calendar/inc/class.calendar_import_ical.inc.php +++ b/calendar/inc/class.calendar_import_ical.inc.php @@ -83,6 +83,11 @@ class calendar_import_ical implements importexport_iface_import_plugin { */ private $user = null; + /** + * List of import warnings + */ + protected $warnings = array(); + /** * List of import errors */ @@ -185,6 +190,18 @@ class calendar_import_ical implements importexport_iface_import_plugin { // lets do it! } + /** + * Returns warnings that were encountered during importing + * Maximum of one warning message per record, but you can append if you need to + * + * @return Array ( + * record_# => warning message + * ) + */ + public function get_warnings() { + return $this->warnings; + } + /** * Returns errors that were encountered during importing * Maximum of one error message per record, but you can append if you need to diff --git a/importexport/inc/class.importexport_iface_import_plugin.inc.php b/importexport/inc/class.importexport_iface_import_plugin.inc.php index bd4933df8c..28f293441f 100644 --- a/importexport/inc/class.importexport_iface_import_plugin.inc.php +++ b/importexport/inc/class.importexport_iface_import_plugin.inc.php @@ -87,6 +87,16 @@ interface importexport_iface_import_plugin { */ public function get_errors(); + /** + * Returns warnings that were encountered during importing + * Maximum of one warning message per record, but you can concatenate them if you need to + * + * @return Array ( + * record_# => warning message + * ) + */ + public function get_warnings(); + /** * Returns a list of actions taken, and the number of records for that action. * Actions are things like 'insert', 'update', 'delete', and may be different for each plugin. diff --git a/infolog/inc/class.infolog_import_infologs_csv.inc.php b/infolog/inc/class.infolog_import_infologs_csv.inc.php index 5634a9f384..5ae4c8c3ee 100644 --- a/infolog/inc/class.infolog_import_infologs_csv.inc.php +++ b/infolog/inc/class.infolog_import_infologs_csv.inc.php @@ -86,6 +86,11 @@ class infolog_import_infologs_csv implements importexport_iface_import_plugin { */ private $user = null; + /** + * List of import warnings + */ + protected $warnings = array(); + /** * List of import errors */ @@ -398,6 +403,18 @@ class infolog_import_infologs_csv implements importexport_iface_import_plugin { // lets do it! } + /** + * Returns warnings that were encountered during importing + * Maximum of one warning message per record, but you can append if you need to + * + * @return Array ( + * record_# => warning message + * ) + */ + public function get_warnings() { + return $this->warnings; + } + /** * Returns errors that were encountered during importing * Maximum of one error message per record, but you can append if you need to diff --git a/resources/inc/class.resources_import_csv.inc.php b/resources/inc/class.resources_import_csv.inc.php index 2665a6b265..b768ccdd66 100644 --- a/resources/inc/class.resources_import_csv.inc.php +++ b/resources/inc/class.resources_import_csv.inc.php @@ -78,6 +78,11 @@ class resources_import_csv implements importexport_iface_import_plugin { */ private $user = null; + /** + * List of import warnings + */ + protected $warnings = array(); + /** * List of import errors */ @@ -309,6 +314,18 @@ class resources_import_csv implements importexport_iface_import_plugin { // lets do it! } + /** + * Returns warnings that were encountered during importing + * Maximum of one warning message per record, but you can append if you need to + * + * @return Array ( + * record_# => warning message + * ) + */ + public function get_warnings() { + return $this->warnings; + } + /** * Returns errors that were encountered during importing * Maximum of one error message per record, but you can append if you need to diff --git a/timesheet/inc/class.timesheet_import_csv.inc.php b/timesheet/inc/class.timesheet_import_csv.inc.php index 3b88633420..b66213670e 100644 --- a/timesheet/inc/class.timesheet_import_csv.inc.php +++ b/timesheet/inc/class.timesheet_import_csv.inc.php @@ -84,6 +84,11 @@ class timesheet_import_csv implements importexport_iface_import_plugin { */ private $user = null; + /** + * List of import warnings + */ + protected $warnings = array(); + /** * List of import errors */ @@ -147,7 +152,7 @@ class timesheet_import_csv implements importexport_iface_import_plugin { $categories = new categories('timesheet'); $lookups = array( 'ts_status' => $this->bo->status_labels, - 'cat_id' => $categories->return_sorted_array(0,False,'','','',true) +// 'cat_id' => $categories->return_sorted_array(0,False,'','','',true) ); // Status need leading spaces removed @@ -449,6 +454,18 @@ class timesheet_import_csv implements importexport_iface_import_plugin { // lets do it! } + /** + * Returns warnings that were encountered during importing + * Maximum of one warning message per record, but you can append if you need to + * + * @return Array ( + * record_# => warning message + * ) + */ + public function get_warnings() { + return $this->warnings; + } + /** * Returns errors that were encountered during importing * Maximum of one error message per record, but you can append if you need to