Check if Propel is initialized or not

This commit is contained in:
William DURAND 2011-04-06 18:19:13 +02:00
parent 88fa406aa2
commit 18d5591bc7

View file

@ -15,13 +15,15 @@ class PropelBundle extends Bundle
set_include_path($this->container->getParameter('propel.phing_path').'/classes'.PATH_SEPARATOR.get_include_path());
}
\Propel::setConfiguration($this->container->get('propel.configuration'));
if (!\Propel::isInit()) {
\Propel::setConfiguration($this->container->get('propel.configuration'));
if ($this->container->getParameter('propel.logging')) {
\Propel::setLogger($this->container->get('propel.logger'));
if ($this->container->getParameter('propel.logging')) {
\Propel::setLogger($this->container->get('propel.logger'));
}
\Propel::initialize();
}
\Propel::initialize();
}
/**