Date index for Mar 2003


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [achievo] Post / global variables



Hi,

Jonas Lincoln wrote:
When trying to migrate to 0.9.2, I've noticed that class.hours.inc nowadays have some global variabels like m_viewdate and so on. Since the global variable $viewdate no longer is available, it breaks quite a lot of my code. What's the purpose behind this change?

This has to do with the fact that as of PHP 4.2, register_globals is Off by default. This means that viewdate is no longer by default available as a global variable. We used to work around this by requiring that you turn register_globals to On, but as of 0.9.2, we wanted to be more out-of-the-box on PHP, which means no longer relying on certain global variables. This is also a lot more secure.


Another thing is that it now uses the session properly to keep track of the viewdate, even if it's not passed in the url.

Depending on the place in your code where you need it, you should use $this->m_viewdate.

Greetings,
Ivo

--
Ivo Jansch <ivo dot 
ibuildings.nl BV - information technology
http://www.ibuildings.nl



http://www.achievo.org/lists achievo.org - ©1999-2002 ibuildings.nl BV