Give a list of what definitions were imported, so you can find them

This commit is contained in:
Nathan Gray 2012-01-20 18:39:50 +00:00
parent c34aa3a335
commit 03671abeb8
4 changed files with 19 additions and 9 deletions

View File

@ -213,7 +213,7 @@ class importexport_definitions_bo {
);
// Avoid warning if no definitions found
if(!is_array($definitions)) return;
if(!is_array($definitions)) return lang('None found');
// save definition(s) into internal table
foreach ( $definitions as $name => $definition_data )
@ -233,6 +233,7 @@ class importexport_definitions_bo {
$definition->save( $definition_id );
}
}
return $definitions;
}
/**

View File

@ -882,8 +882,9 @@ class importexport_definitions_ui
{
if($content['import_file']['tmp_name'])
{
$bodefinitions->import($content['import_file']['tmp_name']);
// TODO make redirect here!
$result = $bodefinitions->import($content['import_file']['tmp_name']);
$msg = lang('%1 definitions %2', count($result), lang('imported')) ."\n". implode("\n", array_keys($result));
return $this->index(null, $msg);
}
if($content['update'])
{
@ -891,8 +892,8 @@ class importexport_definitions_ui
foreach($applist as $appname) {
importexport_helper_functions::load_defaults($appname);
}
return $this->index();
}
return $this->index();
}
else
{

File diff suppressed because one or more lines are too long

View File

@ -56,7 +56,7 @@
</columns>
<rows>
<row disabled="!@msg">
<description id="msg" no_lang="1" span="all" class="redItalic"/>
<description align="center" id="msg" no_lang="1" span="all" class="message"/>
</row>
<row>
<nextmatch cols="6" id="nm" rows="2" options="importexport.definition_index.row"/>