forked from extern/egroupware
- Better messages if import file has a problem
- Reload opening window when definition wizard is done
This commit is contained in:
parent
07f50bb264
commit
9139c11dc5
@ -607,8 +607,8 @@ class importexport_definitions_ui
|
||||
|
||||
if ($content['closewindow'])
|
||||
{
|
||||
$this->response->addScript("opener.location.reload();");
|
||||
$this->response->addScript("window.close();");
|
||||
//$this->response->addScript("opener.location = '" . egw::link('/index.php', array('menuaction' => 'importexport.importexport_definitions_ui.index')) . "';");
|
||||
// If Browser can't close window we display a "close" buuton and
|
||||
// need to disable normal buttons
|
||||
$this->response->addAssign('exec[button][previous]','style.display', 'none');
|
||||
|
@ -72,7 +72,7 @@
|
||||
}
|
||||
|
||||
$file = fopen($content['file']['tmp_name'], 'r');
|
||||
|
||||
$count = 0;
|
||||
|
||||
// Some of the translation, conversion, etc look here
|
||||
$GLOBALS['egw_info']['flags']['currentapp'] = $appname;
|
||||
@ -97,6 +97,7 @@
|
||||
{
|
||||
// Set this so plugin doesn't do any data changes
|
||||
$content['dry-run'] = true;
|
||||
$this->message .= '<b>' . lang('Import aborted').":</b><br />\n";
|
||||
$definition_obj->plugin_options = (array)$definition_obj->plugin_options + array('dry_run' => true);
|
||||
}
|
||||
$this->message .= implode($check_message, "<br />\n") . "<br />\n";
|
||||
@ -106,7 +107,15 @@
|
||||
}
|
||||
$count = $plugin->import($file, $definition_obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->message .= lang('please select file to import'."<br />\n");
|
||||
}
|
||||
|
||||
if($content['dry-run'])
|
||||
{
|
||||
$this->message .= '<b>' . lang('test only').":</b><br />\n";
|
||||
}
|
||||
$this->message .= lang('%1 records processed', $count);
|
||||
|
||||
// Refresh opening window
|
||||
|
Loading…
Reference in New Issue
Block a user