Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
Don'tt store referer when ignore referer flag set
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonbaeten authored Jul 12, 2016
1 parent f8187c2 commit f1977db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Bravesheep/CrudifyBundle/Controller/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ public function editAction(DefinitionInterface $definition, Request $request, $i
}

// store referer to redirect back after save
$this->get('session')->set('edit_referer', $request->headers->get('referer'));
if (!$this->get('session')->remove('ignore_referer')) {
$this->get('session')->set('edit_referer', $request->headers->get('referer'));
}

$form = $this->createUpdateForm($definition, $object);
return $this->render($definition->getTemplates()->getEdit(), [
Expand Down

0 comments on commit f1977db

Please sign in to comment.