rewriting router

This commit is contained in:
Etienne Roudeix
2013-09-06 08:59:06 +02:00
parent 41ed2dcebd
commit b95218295d
6 changed files with 23 additions and 18 deletions

View File

@@ -204,20 +204,20 @@ class URL
public function retrieveCurrent(Request $request)
{
if(ConfigQuery::isRewritingEnable()) {
$view = $request->query->get('view', null);
$view = $request->attributes->get('_view', null);
$viewLocale = $request->query->get('locale', null);
$viewId = $view === null ? null : $request->query->get($view . '_id', null);
$allOtherParameters = $request->query->all();
if($view !== null) {
unset($allOtherParameters['view']);
if($viewId !== null) {
unset($allOtherParameters[$view . '_id']);
}
}
if($viewLocale !== null) {
unset($allOtherParameters['locale']);
}
if($viewId !== null) {
unset($allOtherParameters[$view . '_id']);
}
$this->retriever->loadSpecificUrl($view, $viewLocale, $viewId, $allOtherParameters);
}