Yii Framework Forum: Maintenance - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Maintenance what is the best way?

#1 User is offline   dckurushin 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 392
  • Joined: 16-March 11
  • Location:Israel

Posted 14 September 2011 - 04:10 PM

First of all, I must say thx to Alexandr for the amazing book, today I finished reading it...
learned a lot from it

to the question 8)

I not sure if cookie is the way to go... how can I make sure no one fake it?

One possible solution
'catchAllRequest' => ( (getenv('Maintenance') && session_start() && !isset($_SESSION['adminSession'])) ? 
											array('maintenance/index') : null ),


Anonymous function would do my life easier but it not working... don't know why...
0

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,138
  • Joined: 17-January 09
  • Location:Russia

Posted 15 September 2011 - 12:22 PM

You can't be sure about noone will fake a cookie that's true.

Anonymous function doesn't work because there Yii doesn't expect it: http://www.yiiframew...lRequest-detail
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users