Skip to content

Commit

Permalink
Reverted redirect to absolute url
Browse files Browse the repository at this point in the history
Changed toolbar_item to use url instead of path
  • Loading branch information
martijnhartlief committed May 9, 2019
1 parent ad66342 commit 944d388
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -72,7 +72,7 @@ public function homeAction()

$this->profiler->disable();

return new RedirectResponse($this->generator->generate('_profiler_search_results', ['token' => 'empty', 'limit' => 10], RouterInterface::ABSOLUTE_URL), 302, ['Content-Type' => 'text/html']);
return new RedirectResponse($this->generator->generate('_profiler_search_results', ['token' => 'empty', 'limit' => 10]), 302, ['Content-Type' => 'text/html']);
}

/**
Expand Down Expand Up @@ -321,7 +321,7 @@ public function searchAction(Request $request)
}

if (!empty($token)) {
return new RedirectResponse($this->generator->generate('_profiler', ['token' => $token], RouterInterface::ABSOLUTE_URL), 302, ['Content-Type' => 'text/html']);
return new RedirectResponse($this->generator->generate('_profiler', ['token' => $token]), 302, ['Content-Type' => 'text/html']);
}

$tokens = $this->profiler->find($ip, $url, $limit, $method, $start, $end, $statusCode);
Expand All @@ -335,7 +335,7 @@ public function searchAction(Request $request)
'start' => $start,
'end' => $end,
'limit' => $limit,
], RouterInterface::ABSOLUTE_URL), 302, ['Content-Type' => 'text/html']);
]), 302, ['Content-Type' => 'text/html']);
}

/**
Expand Down
@@ -1,5 +1,5 @@
<div class="sf-toolbar-block sf-toolbar-block-{{ name }} sf-toolbar-status-{{ status|default('normal') }} {{ additional_classes|default('') }}" {{ block_attrs|default('')|raw }}>
{% if link is not defined or link %}<a href="{{ link ? link : path('_profiler', { token: token, panel: name }) }}">{% endif %}
{% if link is not defined or link %}<a href="{{ url('_profiler', { token: token, panel: name }) }}">{% endif %}
<div class="sf-toolbar-icon">{{ icon|default('') }}</div>
{% if link|default(false) %}</a>{% endif %}
<div class="sf-toolbar-info">{{ text|default('') }}</div>
Expand Down

0 comments on commit 944d388

Please sign in to comment.