merged branch fabpot/profiler-fix (PR #7079)

This PR was merged into the 2.2 branch.

Commits
-------

a9f60f7 [WebProfilerBundle] removed dependency on FrameworkBundle (closes #6949)

Discussion
----------

[WebProfilerBundle] removed dependency on FrameworkBundle (closes #6949)

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6949
| License       | MIT
| Doc PR        | n/a
This commit is contained in:
Fabien Potencier 2013-02-17 13:29:29 +01:00
commit 9f0beabdd7
2 changed files with 16 additions and 10 deletions

View File

@ -52,6 +52,18 @@ class ProfilerController
$this->toolbarPosition = $toolbarPosition;
}
/**
* Redirects to the last profiles.
*
* @return RedirectResponse A RedirectResponse instance
*/
public function homeAction()
{
$this->profiler->disable();
return new RedirectResponse($this->generator->generate('_profiler_search_results', array('token' => 'empty', 'limit' => 10)));
}
/**
* Renders a profiler panel for the given token.
*

View File

@ -4,6 +4,10 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
<route id="_profiler_home" pattern="/">
<default key="_controller">web_profiler.controller.profiler:homeAction</default>
</route>
<route id="_profiler_search" pattern="/search">
<default key="_controller">web_profiler.controller.profiler:searchAction</default>
</route>
@ -52,14 +56,4 @@
<default key="_controller">web_profiler.controller.exception:cssAction</default>
</route>
<route id="_profiler_redirect" pattern="/">
<default key="_controller">FrameworkBundle:Redirect:redirect</default>
<default key="route">_profiler_search_results</default>
<default key="token">empty</default>
<default key="ip"></default>
<default key="url"></default>
<default key="method"></default>
<default key="limit">10</default>
</route>
</routes>