Showing
1 changed file
with
3 additions
and
6 deletions
@@ -31,7 +31,7 @@ class Controller_Admin_Base extends Controller_Abstract | @@ -31,7 +31,7 @@ class Controller_Admin_Base extends Controller_Abstract | ||
31 | protected function beforeExecute() | 31 | protected function beforeExecute() |
32 | { | 32 | { |
33 | //获取session | 33 | //获取session |
34 | - $session = $this->getCookie('_admin'); | 34 | + $session = Util_Utils_SafeCookie::get('_admin'); |
35 | $session = unserialize($session); | 35 | $session = unserialize($session); |
36 | //非默认控制器,则校验权限 | 36 | //非默认控制器,则校验权限 |
37 | if ($this->_request->controller_name != 'default' && !$session) | 37 | if ($this->_request->controller_name != 'default' && !$session) |
@@ -77,7 +77,7 @@ class Controller_Admin_Base extends Controller_Abstract | @@ -77,7 +77,7 @@ class Controller_Admin_Base extends Controller_Abstract | ||
77 | { | 77 | { |
78 | $exitUser = serialize($exitUser); | 78 | $exitUser = serialize($exitUser); |
79 | //通过 | 79 | //通过 |
80 | - $this->setCookie('_admin', $exitUser); | 80 | + Util_Utils_SafeCookie::set('_admin', $exitUser); |
81 | return true ; | 81 | return true ; |
82 | } | 82 | } |
83 | return false ; | 83 | return false ; |
@@ -89,9 +89,6 @@ class Controller_Admin_Base extends Controller_Abstract | @@ -89,9 +89,6 @@ class Controller_Admin_Base extends Controller_Abstract | ||
89 | */ | 89 | */ |
90 | protected function logout() | 90 | protected function logout() |
91 | { | 91 | { |
92 | - $this->delCookie('_admin'); | 92 | + Util_Utils_SafeCookie::clear('_admin'); |
93 | } | 93 | } |
94 | - | ||
95 | - | ||
96 | - | ||
97 | } | 94 | } |
-
Please register or login to post a comment