check if configuration is installed

This commit is contained in:
Nicolas Le Goff
2012-01-11 12:25:43 +01:00
parent cf513dd792
commit 1a5ec7d0cf

View File

@@ -63,12 +63,14 @@ class registry implements registryInterface
new \Alchemy\Phrasea\Core\Configuration\Parser\Yaml()
);
$configuration = new \Alchemy\Phrasea\Core\Configuration($handler);
$phraseanet = $configuration->getPhraseanet();
$this->cache->set('GV_RootPath', dirname(dirname(__DIR__)) . '/');
$this->cache->set('GV_ServerName', $phraseanet->get('servername'));
$this->cache->set('GV_debug', $configuration->isDebug());
$this->cache->set('GV_maintenance', $configuration->isMaintained());
$this->cache->set('GV_RootPath', dirname(dirname(__DIR__)) . '/');
if ($configuration->isInstalled())
{
$this->cache->set('GV_ServerName', $configuration->getPhraseanet()->get('servername'));
$this->cache->set('GV_debug', $configuration->isDebug());
$this->cache->set('GV_maintenance', $configuration->isMaintained());
}
return $this;
}