mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-26 07:49:28 +01:00
Improve error message for import errors. Just because there was an error doesn't mean the record wasn't imported using default info
This commit is contained in:
parent
184117b0ec
commit
f3536a72bf
@ -57,14 +57,17 @@
|
|||||||
$count = $plugin->import($file, $definition_obj);
|
$count = $plugin->import($file, $definition_obj);
|
||||||
|
|
||||||
$this->message = lang('%1 records processed', $count);
|
$this->message = lang('%1 records processed', $count);
|
||||||
foreach($plugin->get_results() as $action => $count) {
|
$total_processed = 0;
|
||||||
$this->message .= "\n" . lang($action) . ": $count";
|
foreach($plugin->get_results() as $action => $a_count) {
|
||||||
|
$this->message .= "\n" . lang($action) . ": $a_count";
|
||||||
|
$total_processed += $a_count;
|
||||||
}
|
}
|
||||||
if(count($plugin->get_errors())) {
|
if(count($plugin->get_errors())) {
|
||||||
$this->message .= "\n".lang('Unable to import:');
|
$this->message .= "\n".lang('Problems during import:');
|
||||||
foreach($plugin->get_errors() as $record => $message) {
|
foreach($plugin->get_errors() as $record => $message) {
|
||||||
$this->message .= "\n$record: $message";
|
$this->message .= "\n$record: $message";
|
||||||
}
|
}
|
||||||
|
if($count != $total_processed) $this->message .= "\n".lang('Some records may not have been imported');
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->message = $e->getMessage();
|
$this->message = $e->getMessage();
|
||||||
|
@ -55,6 +55,7 @@ please select file to import importexport en Please select file to import
|
|||||||
plugin importexport en Plugin
|
plugin importexport en Plugin
|
||||||
preview importexport en Preview
|
preview importexport en Preview
|
||||||
previous importexport en previous
|
previous importexport en previous
|
||||||
|
problems during import: importexport en Problems during import:
|
||||||
save as definition importexport en Save as definition
|
save as definition importexport en Save as definition
|
||||||
schedule common en Schedule
|
schedule common en Schedule
|
||||||
schedule import / export common en Schedule import / export
|
schedule import / export common en Schedule import / export
|
||||||
@ -63,6 +64,7 @@ select definition importexport en Select definition
|
|||||||
select plugin importexport en Select plugin
|
select plugin importexport en Select plugin
|
||||||
select... importexport en Select...
|
select... importexport en Select...
|
||||||
some nice text importexport en some nice text
|
some nice text importexport en some nice text
|
||||||
|
some records may not have been imported importexport en Some records may not have been imported
|
||||||
stop importexport en Stop
|
stop importexport en Stop
|
||||||
target importexport en Target
|
target importexport en Target
|
||||||
target examples: vfs://default/home/user/export.csv or http://server.net/prices.csv importexport en Target examples: vfs://default/home/user/export.csv or http://server.net/prices.csv
|
target examples: vfs://default/home/user/export.csv or http://server.net/prices.csv importexport en Target examples: vfs://default/home/user/export.csv or http://server.net/prices.csv
|
||||||
@ -70,7 +72,6 @@ target field importexport en Target Field
|
|||||||
test only importexport en Test only
|
test only importexport en Test only
|
||||||
translation importexport en Translation
|
translation importexport en Translation
|
||||||
true importexport en True
|
true importexport en True
|
||||||
unable to import: importexport en Unable to import:
|
|
||||||
unable to schedule importexport en Unable to schedule
|
unable to schedule importexport en Unable to schedule
|
||||||
update categories importexport en Update categories
|
update categories importexport en Update categories
|
||||||
users allowed to create their own definitions importexport en Users allowed to create their own definitions
|
users allowed to create their own definitions importexport en Users allowed to create their own definitions
|
||||||
|
Loading…
Reference in New Issue
Block a user