Use a variable to handle the misc_dir

This commit is contained in:
Li Chen 2013-11-25 18:24:46 +01:00
parent e137e755c0
commit a9fdcaf9f2
3 changed files with 58 additions and 26 deletions

View file

@ -6,8 +6,15 @@ include 'certificate.php';
if (!empty($_FILES["inputFile"]['tmp_name']))
{
//TODO use a variable to define the path
if (!file_exists(ONYX . "../misc/fic_pki/cacert.crt"))
if (isset($VAR['misc_dir']))
$misc_dir = $VAR['misc_dir'];
else
{
erreur("Please add the misc_dir variable into root.xml");
return "admin/import_users";
}
if (!file_exists("$misc_dir/pki/cacert.crt"))
{
erreur("The root certificate file not found, please create this first");
return "admin/import_users";