summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TPage.php
diff options
context:
space:
mode:
authormikl <>2008-10-14 14:05:27 +0000
committermikl <>2008-10-14 14:05:27 +0000
commita2bc3a55c61c796522fc30a08927f43fdd00126b (patch)
tree5145d62ffee264c558e15bc607820f6df8c7bfc1 /framework/Web/UI/TPage.php
parente53fad78d31caa06c2e046ea49a9f894f9ea685a (diff)
Fixed #938
Diffstat (limited to 'framework/Web/UI/TPage.php')
-rw-r--r--framework/Web/UI/TPage.php8
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)