From ec245862327d6a3722c4d41c70b87d5562452232 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Wed, 11 Sep 2013 15:04:47 +0200 Subject: [PATCH] add some information in propelcollector --- .../DebugBar/DataCollector/PropelCollector.php | 4 ++-- .../modules/DebugBar/Smarty/Plugin/DebugBar.php | 17 ----------------- templates/admin/default/admin-layout.tpl | 2 +- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/local/modules/DebugBar/DataCollector/PropelCollector.php b/local/modules/DebugBar/DataCollector/PropelCollector.php index 823a31666..b0d503b18 100644 --- a/local/modules/DebugBar/DataCollector/PropelCollector.php +++ b/local/modules/DebugBar/DataCollector/PropelCollector.php @@ -66,8 +66,8 @@ class PropelCollector extends DataCollector implements Renderable, LoggerInterfa return array( 'nb_statements' => count($this->statements), 'nb_failed_statements' => 0, - 'accumulated_duration' => '10', - 'accumulated_duration_str' => $this->formatDuration(1), + 'accumulated_duration' => $this->accumulatedTime, + 'accumulated_duration_str' => $this->formatDuration($this->accumulatedTime), 'peak_memory_usage' => $this->peakMemory, 'peak_memory_usage_str' => $this->formatBytes($this->peakMemory), 'statements' => $this->statements diff --git a/local/modules/DebugBar/Smarty/Plugin/DebugBar.php b/local/modules/DebugBar/Smarty/Plugin/DebugBar.php index 70a896433..0cd1abee9 100644 --- a/local/modules/DebugBar/Smarty/Plugin/DebugBar.php +++ b/local/modules/DebugBar/Smarty/Plugin/DebugBar.php @@ -104,23 +104,6 @@ class DebugBar extends AbstractSmartyPlugin return $render; } - public function renderHead($params, \Smarty_Internal_Template $template) - { - $render = ""; - if ($this->debugMode) { - $javascriptRenderer = $this->debugBar->getJavascriptRenderer(); - $assets = $javascriptRenderer->getAssets(); - - $cssCollection = $assets[0]; - $jsCollection = $assets[1]; - - $render .= sprintf('', $cssCollection->dump()); - $render .= sprintf('', $jsCollection->dump()); - } - - return $render; - } - /** * @return an array of SmartyPluginDescriptor */ diff --git a/templates/admin/default/admin-layout.tpl b/templates/admin/default/admin-layout.tpl index 942557600..188ba75f4 100644 --- a/templates/admin/default/admin-layout.tpl +++ b/templates/admin/default/admin-layout.tpl @@ -224,7 +224,7 @@ {debugbar_renderjs} - {debugbar_renderresult} + {block name="after-javascript-include"}{/block}