summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/TApplication.php9
1 files changed, 6 insertions, 3 deletions
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);
}
}