Fix: affichage d'un message d'erreur si conf.php est en lecture seule
This commit is contained in:
parent
79cb71180f
commit
b72ef4d967
@ -36,6 +36,8 @@ if (!$user->admin) accessforbidden();
|
|||||||
// Do not allow change to clear model once passwords are crypted
|
// Do not allow change to clear model once passwords are crypted
|
||||||
$allow_disable_encryption=false;
|
$allow_disable_encryption=false;
|
||||||
|
|
||||||
|
$mesg = '';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -90,16 +92,30 @@ else if ($_GET["action"] == 'disable_encrypt')
|
|||||||
if ($_GET["action"] == 'activate_encryptdbpassconf')
|
if ($_GET["action"] == 'activate_encryptdbpassconf')
|
||||||
{
|
{
|
||||||
$result = encodedecode_dbpassconf(1);
|
$result = encodedecode_dbpassconf(1);
|
||||||
if ($result > 0) dolibarr_set_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED", "1");
|
if ($result > 0)
|
||||||
Header("Location: security.php");
|
{
|
||||||
exit;
|
dolibarr_set_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED", "1");
|
||||||
|
Header("Location: security.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg='<div class="error">'.$langs->trans('ConfigFilesIsReadOnly').'</div>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ($_GET["action"] == 'disable_encryptdbpassconf')
|
else if ($_GET["action"] == 'disable_encryptdbpassconf')
|
||||||
{
|
{
|
||||||
$result = encodedecode_dbpassconf(0);
|
$result = encodedecode_dbpassconf(0);
|
||||||
if ($result > 0) dolibarr_del_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED");
|
if ($result > 0)
|
||||||
Header("Location: security.php");
|
{
|
||||||
exit;
|
dolibarr_del_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED");
|
||||||
|
Header("Location: security.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg = '<div class="error">'.$langs->trans('ConfigFilesIsReadOnly').'</div>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -108,6 +124,8 @@ else if ($_GET["action"] == 'disable_encryptdbpassconf')
|
|||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
|
if ($mesg) print "$mesg\n";
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("SecuritySetup"),'','setup');
|
print_fiche_titre($langs->trans("SecuritySetup"),'','setup');
|
||||||
|
|
||||||
print $langs->trans("GeneratedPasswordDesc")."<br>\n";
|
print $langs->trans("GeneratedPasswordDesc")."<br>\n";
|
||||||
|
|||||||
@ -94,6 +94,7 @@ Security=Security
|
|||||||
Passwords=Passwords
|
Passwords=Passwords
|
||||||
DoNotStoreClearPassword=Do no store clear passwords in database
|
DoNotStoreClearPassword=Do no store clear passwords in database
|
||||||
MainDbPasswordFileConfEncrypted=Password of the database encrypted in conf.php
|
MainDbPasswordFileConfEncrypted=Password of the database encrypted in conf.php
|
||||||
|
ConfigFilesIsReadOnly=The file conf.php is in read only, check the rights.
|
||||||
Feature=Feature
|
Feature=Feature
|
||||||
DolibarrLicense=License
|
DolibarrLicense=License
|
||||||
DolibarrProjectLeader=Project leader
|
DolibarrProjectLeader=Project leader
|
||||||
|
|||||||
@ -94,6 +94,7 @@ Security=S
|
|||||||
Passwords=Mots de passe
|
Passwords=Mots de passe
|
||||||
DoNotStoreClearPassword=Ne pas stocker de mot de passe en clair dans la base
|
DoNotStoreClearPassword=Ne pas stocker de mot de passe en clair dans la base
|
||||||
MainDbPasswordFileConfEncrypted=Encrypter le mot de passe de la base dans le fichier conf.php
|
MainDbPasswordFileConfEncrypted=Encrypter le mot de passe de la base dans le fichier conf.php
|
||||||
|
ConfigFilesIsReadOnly=Le fichier conf.php est lecture seule, vérifiez les droits d'écriture.
|
||||||
Feature=Fonction
|
Feature=Fonction
|
||||||
DolibarrLicense=Licence
|
DolibarrLicense=Licence
|
||||||
DolibarrProjectLeader=Chef de projet
|
DolibarrProjectLeader=Chef de projet
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user