From 2ac6626cdda56b889b89d97c6b47df8e21d03169 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 20 Dec 2011 17:03:05 +0000 Subject: [PATCH] Add warnings --- calendar/inc/class.calendar_import_csv.inc.php | 17 +++++++++++++++++ calendar/inc/class.calendar_import_ical.inc.php | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) 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