summaryrefslogtreecommitdiff
path: root/framework/TApplication.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/TApplication.php')
-rw-r--r--framework/TApplication.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/framework/TApplication.php b/framework/TApplication.php
index 974f0ec4..ce05893b 100644
--- a/framework/TApplication.php
+++ b/framework/TApplication.php
@@ -437,9 +437,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);
+ }
}
/**
@@ -1035,6 +1037,7 @@ class TApplication extends TComponent
*/
public function onEndRequest()
{
+ $this->saveGlobals(); // save global state
$this->raiseEvent('OnEndRequest',$this,null);
}
}