From a2bc3a55c61c796522fc30a08927f43fdd00126b Mon Sep 17 00:00:00 2001 From: mikl <> Date: Tue, 14 Oct 2008 14:05:27 +0000 Subject: Fixed #938 --- framework/Web/UI/TPage.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'framework/Web/UI/TPage.php') 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) -- cgit v1.2.3