fix usage of ProfilerConnectionWrapper

This commit is contained in:
Manuel Raynaud
2013-09-30 15:35:46 +02:00
parent f25922c60a
commit fc0cac2cb9
4 changed files with 6 additions and 16 deletions

View File

@@ -60,7 +60,7 @@ class DatabaseConfiguration implements ConfigurationInterface
->cannotBeEmpty() ->cannotBeEmpty()
->end() ->end()
->scalarNode("classname") ->scalarNode("classname")
->defaultValue("\Propel\Runtime\Connection\PropelPDO") ->defaultValue("\Propel\Runtime\Connection\ConnectionWrapper")
->end() ->end()
->end() ->end()
->end() ->end()

View File

@@ -47,10 +47,9 @@ class PropelCollector extends DataCollector implements Renderable, LoggerInterfa
public function __construct(LoggerInterface $alternativeLogger = null) public function __construct(LoggerInterface $alternativeLogger = null)
{ {
$serviceContainer = Propel::getServiceContainer(); $con = Propel::getServiceContainer()->getConnection(\Thelia\Model\Map\ProductTableMap::DATABASE_NAME);
$serviceContainer->setLogger('defaultLogger', $this); $con->setLogger($this);
$con = Propel::getConnection(\Thelia\Model\Map\ProductTableMap::DATABASE_NAME);
$con->setLogMethods(array( $con->setLogMethods(array(
'exec', 'exec',
'query', 'query',

View File

@@ -2,9 +2,9 @@
<ul class="breadcrumb"> <ul class="breadcrumb">
<li><a href="{url path='admin/home'}">{intl l="Home"}</a></li> <li><a href="{url path='admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='admin/folders'}">{intl l="Folders"}</a> <li><a href="{url path='admin/folders'}">{intl l="Folders"}</a></li>
{ifloop rel="folder_path"}</li> {ifloop rel="folder_path"}
{loop name="folder_path" type="folder-path" visible="*" folder=$folder_id} {loop name="folder_path" type="folder-path" visible="*" folder=$folder_id}
{if $ID == $parent} {if $ID == $parent}
<li class="active"> <li class="active">
@@ -20,10 +20,6 @@
{/loop} {/loop}
{/ifloop} {/ifloop}
{elseloop rel="folder_path"}
</li>
{/elseloop}
{if $editing_content == true} {if $editing_content == true}
{loop name="content_path" type="content" visible="*" id=$content_id} {loop name="content_path" type="content" visible="*" id=$content_id}
<li>{intl l="Editing %title" title="$TITLE"}</li> <li>{intl l="Editing %title" title="$TITLE"}</li>

View File

@@ -49,9 +49,4 @@ if ( false === in_array($request->getClientIp(), $trustedIp)) {
$response = $thelia->handle($request)->prepare($request)->send(); $response = $thelia->handle($request)->prepare($request)->send();
$thelia->terminate($request, $response); $thelia->terminate($request, $response);
if (strstr($response->headers->get('content-type'), 'text/html') !== false) {
echo "\n<!-- page parsed in : " . (microtime(true) - $thelia->getStartTime())." s. -->";
echo "\n<!-- memory peak : " . memory_get_peak_usage()/1024/1024 . " MiB. -->";
}