From 1a5ec7d0cf3c137930ff564dff9f98dc50cc7bcc Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 11 Jan 2012 12:25:43 +0100 Subject: [PATCH] check if configuration is installed --- lib/classes/registry.class.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/classes/registry.class.php b/lib/classes/registry.class.php index 4e4bf39708..1ab18eecf4 100644 --- a/lib/classes/registry.class.php +++ b/lib/classes/registry.class.php @@ -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; }