openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 90a89dccaa499255fa5e7f1a4463c3632cdca8f1
parent f14eb743804078fc219d664b261998570eed5867
Author: dankert <devnull@localhost>
Date:   Thu,  8 Oct 2009 23:23:21 +0200

Redirect after POST (GET after POST) für Write-Aktionen. Ist noch problematisch, da eine Notice-Meldung nicht angezeigt werden kann.

Diffstat:
Mdo.php | 16++++++++++++++++
1 file changed, 16 insertions(+), 0 deletions(-)

diff --git a/do.php b/do.php @@ -289,7 +289,21 @@ if ( isset($do->actionConfig[$do->subActionName]['write']) ) { $subactionAction = $subaction.'Action'; $do->$subactionAction(); + + if ( $conf['interface']['redirect'] ) + { + // Wenn Validierungsfehler aufgetrete sind, auf keinen Fall einen Redirect machen, da sonst + // im nächste Request die Eingabedaten fehlen. + if ( empty($do->templateVars['errors']) ) + { + header( 'HTTP/1.0 303 See other'); + // Absoluten Pfad kann auch der Client erg�nzen. + header( 'Location: '.Html::url($action,$subaction,$do->getRequestId()) ); + exit; + } + } } + $subactionView = $subaction.'View'; $do->$subactionView(); } @@ -303,6 +317,7 @@ else // Aufruf der n�chsten Subaction (falls vorhanden) if ( isset($do->actionConfig[$do->subActionName]['goto']) ) { + /* Führt zu Problemen beim Login sowie der Anzeige von Notices. if ( $conf['interface']['redirect'] ) { // Wenn Validierungsfehler aufgetrete sind, auf keinen Fall einen Redirect machen, da sonst @@ -316,6 +331,7 @@ if ( isset($do->actionConfig[$do->subActionName]['goto']) ) exit; } } + */ $subActionName = $do->actionConfig[$do->subActionName]['goto']; $do->subActionName = $subActionName;