On Thu, May 22, 2008 at 12:05 PM, Tim Starling tstarling@wikimedia.org wrote:
== Global variables are evil ==
[...]
If you do need to use a legacy global variable such as $wgUser, just put the global statement where it's needed. Don't pull the object out of the global namespace and pass it from function to function unless there's a concrete need for that versatility.
Time to deprecate all of them in favor of something like MediaWiki::singleton()->getUser(); ? It's probably slower but less evil.
Bryan