mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Refactor Configuration
This commit is contained in:
@@ -70,21 +70,9 @@ class setup
|
||||
|
||||
public static function is_installed()
|
||||
{
|
||||
$appConf = new \Alchemy\Phrasea\Core\Configuration\Application();
|
||||
$installed = false;
|
||||
try
|
||||
{
|
||||
$appConf->getConfigurationFile();
|
||||
$appConf->getConnexionFile();
|
||||
$appConf->getServiceFile();
|
||||
$installed = true;
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
$appConf = new \Alchemy\Phrasea\Core\Configuration\ApplicationSpecification();
|
||||
|
||||
}
|
||||
|
||||
return $installed;
|
||||
return $appConf->isSetup();
|
||||
}
|
||||
|
||||
public static function needUpgradeConfigurationFile()
|
||||
@@ -817,38 +805,10 @@ class setup
|
||||
}
|
||||
}
|
||||
|
||||
$appConf = new \Alchemy\Phrasea\Core\Configuration\Application();
|
||||
|
||||
try
|
||||
{
|
||||
$configFile = $appConf->getConfigurationFile();
|
||||
unlink($configFile->getPathname());
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$serviceFile = $appConf->getServiceFile();
|
||||
unlink($serviceFile->getPathname());
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$connexionfFile = $appConf->getConnexionFile();
|
||||
unlink($connexionfFile->getPathname());
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
|
||||
}
|
||||
$appConf = new \Alchemy\Phrasea\Core\Configuration\ApplicationSpecification();
|
||||
|
||||
$appConf->delete();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user