diff options
Diffstat (limited to 'framework/Web/UI/TPage.php')
-rw-r--r-- | framework/Web/UI/TPage.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php index 1a0f04a6..12433715 100644 --- a/framework/Web/UI/TPage.php +++ b/framework/Web/UI/TPage.php @@ -1234,10 +1234,10 @@ class TPageStateFormatter $str=$sm->hashData(Prado::serialize($data));
else
$str=Prado::serialize($data);
- if($page->getEnableStateEncryption())
- $str=$sm->encrypt($str);
if(extension_loaded('zlib'))
$str=gzcompress($str);
+ if($page->getEnableStateEncryption())
+ $str=$sm->encrypt($str);
return base64_encode($str);
}
@@ -1251,13 +1251,13 @@ class TPageStateFormatter $str=base64_decode($data);
if($str==='')
return null;
- if(extension_loaded('zlib'))
- $str=@gzuncompress($str);
if($str!==false)
{
$sm=$page->getApplication()->getSecurityManager();
if($page->getEnableStateEncryption())
$str=$sm->decrypt($str);
+ if(extension_loaded('zlib'))
+ $str=@gzuncompress($str);
if($page->getEnableStateValidation())
{
if(($str=$sm->validateData($str))!==false)
|