瀏覽代碼

[WebProfilerBundle] Allow .html.twig in collector template names

Jordi Boggiano 13 年之前
父節點
當前提交
6ca72cf9ac
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php

+ 3 - 0
src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php

@@ -265,6 +265,9 @@ class ProfilerController extends ContainerAware
             }
 
             list($name, $template) = $arguments;
+            if ('.html.twig' === substr($template, -10)) {
+                $template = substr($template, 0, -10);
+            }
             if (!$profiler->has($name) || !$this->container->get('templating')->exists($template.'.html.twig')) {
                 continue;
             }