From 5f1c65b31eb331c815d2975a3cb86b64011455ef Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 19 Mar 2012 18:45:14 +0000 Subject: [PATCH] Give proper error messages for modification error as well as permissions error --- .../class.infolog_import_infologs_csv.inc.php | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/infolog/inc/class.infolog_import_infologs_csv.inc.php b/infolog/inc/class.infolog_import_infologs_csv.inc.php index 5186a247e3..42cfbe327d 100644 --- a/infolog/inc/class.infolog_import_infologs_csv.inc.php +++ b/infolog/inc/class.infolog_import_infologs_csv.inc.php @@ -327,12 +327,22 @@ class infolog_import_infologs_csv implements importexport_iface_import_plugin { break; } else { $result = $this->boinfolog->write( $_data, true, 2); // 2 = dont touch modification date - if(!$result) { - $this->errors[$record_num] = lang('Permissions error - %1 could not %2', - $GLOBALS['egw']->accounts->id2name($_data['info_owner']), - lang($_action) - ); - } else { + if(!$result) + { + if($result === false) + { + $this->errors[$record_num] = lang('Permissions error - %1 could not %2', + $GLOBALS['egw']->accounts->id2name($_data['info_owner']), + lang($_action) + ); + } + else + { + $this->errors[$record_num] = lang('Error: the entry has been updated since you opened it for editing!'); + } + } + else + { $this->results[$_action]++; } break;