Display a confirmation message after the importation
This commit is contained in:
parent
ea27ea5855
commit
ce28dd8cbb
@ -4,6 +4,8 @@ if(!defined('ONYX')) exit;
|
||||
|
||||
if ($SESS->level > 1)
|
||||
{
|
||||
$page = "admin/import_exercices";
|
||||
|
||||
if (!empty($_FILES["inputFile"]['tmp_name']))
|
||||
{
|
||||
$doc = new DOMDocument();
|
||||
@ -70,9 +72,9 @@ if ($SESS->level > 1)
|
||||
erreur("Unable to add '".$ex->id."' exercice.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$page = "admin/import_exercices";
|
||||
erreur("XML file successfully imported.", "success");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4,10 +4,12 @@ if(!defined('ONYX')) exit;
|
||||
|
||||
if ($SESS->level > 1)
|
||||
{
|
||||
$page = "admin/import_users";
|
||||
|
||||
if (!empty($_FILES["inputFile"]['tmp_name']))
|
||||
{
|
||||
$doc = new DOMDocument();
|
||||
if (!$doc->load($_FILES["inputFile"]['tmp_name']))
|
||||
if (@!$doc->load($_FILES["inputFile"]['tmp_name']))
|
||||
{
|
||||
erreur("Unable to parse given file. A XML file was expected.");
|
||||
return;
|
||||
@ -44,12 +46,8 @@ if ($SESS->level > 1)
|
||||
erreur("Unable to add user ".$user->username);
|
||||
}
|
||||
}
|
||||
|
||||
// Define thema information
|
||||
$theme = new Theme();
|
||||
erreur("XML file successfully imported.", "success");
|
||||
}
|
||||
|
||||
$page = "admin/import_users";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user