Skip to content

Commit

Permalink
call to $persistenceManager->persistAll() removed from createAction, …
Browse files Browse the repository at this point in the history
…use forward instead of redirect in createAction and updateAction.

Persisting manually seems not to be necessary when action is finished.
  • Loading branch information
dwenzel committed Jul 26, 2014
1 parent 66bdfb8 commit d5b28d3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Classes/Controller/PositionController.php
Expand Up @@ -324,9 +324,7 @@ public function createAction(\Webfox\Placements\Domain\Model\Position $newPositi
$this->addFlashMessage(
$this->translate('tx_placements.success.position.createAction')
);
$persistenceManager = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager');
$persistenceManager->persistAll();
$this->redirect('show', NULL, NULL, array('position'=>$newPosition), $this->settings['detailPid']);
$this->forward('show', NULL, NULL, array('position'=>$newPosition), $this->settings['detailPid']);
}

/**
Expand Down Expand Up @@ -393,7 +391,7 @@ public function updateAction(\Webfox\Placements\Domain\Model\Position $position)
$this->addFlashMessage(
$this->translate('tx_placements.success.position.updateAction')
);
$this->redirect('show', NULL, NULL, array('position' => $position), $this->settings['detailPid']);
$this->forward('show', NULL, NULL, array('position' => $position), $this->settings['detailPid']);
}

/**
Expand Down

0 comments on commit d5b28d3

Please sign in to comment.