summaryrefslogtreecommitdiff
path: root/framework/TApplication.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/TApplication.php')
-rw-r--r--framework/TApplication.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/framework/TApplication.php b/framework/TApplication.php
index 1fc9485a..703dae17 100644
--- a/framework/TApplication.php
+++ b/framework/TApplication.php
@@ -468,14 +468,17 @@ class TApplication extends TComponent
* @param string the name of the value to be set
* @param mixed the global value to be set
* @param mixed the default value. If $key is not found, $defaultValue will be returned
+ * @param boolean wheter to force an immediate GlobalState save. defaults to false
*/
- public function setGlobalState($key,$value,$defaultValue=null)
+ public function setGlobalState($key,$value,$defaultValue=null,$forceSave=false)
{
$this->_stateChanged=true;
if($value===$defaultValue)
unset($this->_globals[$key]);
else
$this->_globals[$key]=$value;
+ if($forceSave)
+ $this->saveGlobals();
}
/**