From d840107832b1f59a9fc3b93ffb97ef976be1b83c Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Thu, 17 Nov 2011 16:52:56 +0000 Subject: 3-in-1 bugfix commit: 1) TErrorHandler: avoid an error when trying to hide the file path of a lambda function 2) TSecurityManager: avoid a race condition when first generating the encryptionkey or the validationkey 3) TActiveFileUpload: urlencode the base64'ed token since it can contain the "+" character (otherway it would be traslated to a space) --- framework/TApplication.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'framework/TApplication.php') 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(); } /** -- cgit v1.2.3