Skip to content

Commit

Permalink
Removido o redirecionamento porque fez sumir as mensagens de sucesso/…
Browse files Browse the repository at this point in the history
…erro. Refazer depois usando session (flash message) #33
  • Loading branch information
rogeriolino committed Apr 15, 2013
1 parent 9e4c473 commit 3823fed
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/web/core/controller/CrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,13 @@ public function edit(SGAContext $context) {
*/
protected function doSave(SGAContext $context, SequencialModel $model) {
$this->preSave($context, $model);
$redirUrl = $_SERVER['HTTP_REFERER'];
if ($model->getId() > 0) {
$this->em()->merge($model);
} else {
$this->em()->persist($model);
$redirUrl .= '&id=' . $model->getId();
}
$this->em()->flush();
$this->postSave($context, $model);
SGA::redirect($redirUrl);
}

protected function preSave(SGAContext $context, SequencialModel $model) {}
Expand Down

0 comments on commit 3823fed

Please sign in to comment.