Try to solve a flush pb
This commit is contained in:
parent
7037679718
commit
747c49862c
@ -126,7 +126,9 @@ if ($action == 'activate_encryptdbpassconf')
|
||||
$result = encodedecode_dbpassconf(1);
|
||||
if ($result > 0)
|
||||
{
|
||||
// database value not required
|
||||
sleep(3); // Don't know why but we need to wait file is completely saved before making the reload. Even with flush and clearstatcache, we need to wait.
|
||||
|
||||
// database value not required
|
||||
//dolibarr_set_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED", "1");
|
||||
header("Location: security.php");
|
||||
exit;
|
||||
@ -141,6 +143,8 @@ else if ($action == 'disable_encryptdbpassconf')
|
||||
$result = encodedecode_dbpassconf(0);
|
||||
if ($result > 0)
|
||||
{
|
||||
sleep(3); // Don't know why but we need to wait file is completely saved before making the reload. Even with flush and clearstatcache, we need to wait.
|
||||
|
||||
// database value not required
|
||||
//dolibarr_del_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED",$conf->entity);
|
||||
header("Location: security.php");
|
||||
|
||||
@ -416,7 +416,10 @@ function encodedecode_dbpassconf($level=0)
|
||||
if ($fp = @fopen($file,'w'))
|
||||
{
|
||||
fputs($fp, $config);
|
||||
fflush($fp);
|
||||
fclose($fp);
|
||||
clearstatcache();
|
||||
|
||||
// It's config file, so we set read permission for creator only.
|
||||
// Should set permission to web user and groups for users used by batch
|
||||
//@chmod($file, octdec('0600'));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user