From 78bf7247e37a3bc15cbc604c5b2255de2f65c8f8 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 26 Nov 2006 14:53:30 +0000 Subject: Fixed the bug that global state was not saved when redirect() is invoked --- framework/TApplication.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'framework/TApplication.php') diff --git a/framework/TApplication.php b/framework/TApplication.php index 4091ceb8..ba3d3551 100644 --- a/framework/TApplication.php +++ b/framework/TApplication.php @@ -436,9 +436,11 @@ class TApplication extends TComponent */ protected function saveGlobals() { - if(!$this->_stateChanged) - return; - $this->getApplicationStatePersister()->save($this->_globals); + if($this->_stateChanged) + { + $this->_stateChanged=false; + $this->getApplicationStatePersister()->save($this->_globals); + } } /** @@ -1034,6 +1036,7 @@ class TApplication extends TComponent */ public function onEndRequest() { + $this->saveGlobals(); // save global state $this->raiseEvent('OnEndRequest',$this,null); } } -- cgit v1.2.3