Disable application.ini autosaving (#1509)

This commit is contained in:
RainLoop 2017-09-21 22:15:27 +03:00
parent 76f28b354b
commit f695a1acd2

View file

@ -213,30 +213,26 @@ class Actions
if (null === $this->oConfig) if (null === $this->oConfig)
{ {
$this->oConfig = new \RainLoop\Config\Application(); $this->oConfig = new \RainLoop\Config\Application();
if (!$this->oConfig->Load())
$bSave = defined('APP_INSTALLED_START');
$bLoaded = $this->oConfig->Load();
if (!$bLoaded && !$bSave)
{ {
usleep(10000); // TODO usleep(10000);
$bLoaded = $this->oConfig->Load(); $this->oConfig->Load();
} }
if (!$bLoaded && !$this->oConfig->IsFileExists()) // if (!$bLoaded && !$this->oConfig->IsFileExists())
{ // {
$bSave = true; // $bSave = true;
} // }
//
if ($bLoaded && !$bSave) // if ($bLoaded && !$bSave)
{ // {
$bSave = APP_VERSION !== $this->oConfig->Get('version', 'current'); // $bSave = APP_VERSION !== $this->oConfig->Get('version', 'current');
} // }
//
if ($bSave) // if ($bSave)
{ // {
$this->oConfig->Save(); // $this->oConfig->Save();
} // }
} }
return $this->oConfig; return $this->oConfig;