From fc0cac2cb99eb21bba2b7217055a0d352be03106 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Mon, 30 Sep 2013 15:35:46 +0200 Subject: [PATCH] fix usage of ProfilerConnectionWrapper --- core/lib/Thelia/Config/DatabaseConfiguration.php | 2 +- .../TheliaDebugBar/DataCollector/PropelCollector.php | 5 ++--- templates/admin/default/includes/folder-breadcrumb.html | 8 ++------ web/index_dev.php | 7 +------ 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/core/lib/Thelia/Config/DatabaseConfiguration.php b/core/lib/Thelia/Config/DatabaseConfiguration.php index 1c0622623..6d74a03fb 100755 --- a/core/lib/Thelia/Config/DatabaseConfiguration.php +++ b/core/lib/Thelia/Config/DatabaseConfiguration.php @@ -60,7 +60,7 @@ class DatabaseConfiguration implements ConfigurationInterface ->cannotBeEmpty() ->end() ->scalarNode("classname") - ->defaultValue("\Propel\Runtime\Connection\PropelPDO") + ->defaultValue("\Propel\Runtime\Connection\ConnectionWrapper") ->end() ->end() ->end() diff --git a/local/modules/TheliaDebugBar/DataCollector/PropelCollector.php b/local/modules/TheliaDebugBar/DataCollector/PropelCollector.php index 2605e07dd..00d99f9d2 100755 --- a/local/modules/TheliaDebugBar/DataCollector/PropelCollector.php +++ b/local/modules/TheliaDebugBar/DataCollector/PropelCollector.php @@ -47,10 +47,9 @@ class PropelCollector extends DataCollector implements Renderable, LoggerInterfa public function __construct(LoggerInterface $alternativeLogger = null) { - $serviceContainer = Propel::getServiceContainer(); - $serviceContainer->setLogger('defaultLogger', $this); + $con = Propel::getServiceContainer()->getConnection(\Thelia\Model\Map\ProductTableMap::DATABASE_NAME); + $con->setLogger($this); - $con = Propel::getConnection(\Thelia\Model\Map\ProductTableMap::DATABASE_NAME); $con->setLogMethods(array( 'exec', 'query', diff --git a/templates/admin/default/includes/folder-breadcrumb.html b/templates/admin/default/includes/folder-breadcrumb.html index e550ebd8a..da983ec28 100644 --- a/templates/admin/default/includes/folder-breadcrumb.html +++ b/templates/admin/default/includes/folder-breadcrumb.html @@ -2,9 +2,9 @@