Reverted the feature to display different toolbar versions

This commit is contained in:
Javier Eguiluz 2015-07-27 09:36:22 +02:00
parent 084cca644d
commit 7ec1cd491d
2 changed files with 1 additions and 8 deletions

View File

@ -28,9 +28,6 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
*/ */
class ProfilerController class ProfilerController
{ {
const TOOLBAR_VERSION_1 = 1;
const TOOLBAR_VERSION_2 = 2;
private $templateManager; private $templateManager;
private $generator; private $generator;
private $profiler; private $profiler;
@ -205,15 +202,12 @@ class ProfilerController
// the profiler is not enabled // the profiler is not enabled
} }
$toolbarVersion = Kernel::VERSION_ID < 20800 ? self::TOOLBAR_VERSION_1 : self::TOOLBAR_VERSION_2;
return new Response($this->twig->render('@WebProfiler/Profiler/toolbar.html.twig', array( return new Response($this->twig->render('@WebProfiler/Profiler/toolbar.html.twig', array(
'position' => $position, 'position' => $position,
'profile' => $profile, 'profile' => $profile,
'templates' => $this->getTemplateManager()->getTemplates($profile), 'templates' => $this->getTemplateManager()->getTemplates($profile),
'profiler_url' => $url, 'profiler_url' => $url,
'token' => $token, 'token' => $token,
'toolbar_version' => $toolbarVersion,
)), 200, array('Content-Type' => 'text/html')); )), 200, array('Content-Type' => 'text/html'));
} }

View File

@ -30,8 +30,7 @@
'collector': profile.getcollector(name), 'collector': profile.getcollector(name),
'profiler_url': profiler_url, 'profiler_url': profiler_url,
'token': profile.token, 'token': profile.token,
'name': name, 'name': name
'toolbar_version': toolbar_version
}) })
}} }}
{% endfor %} {% endfor %}