More globals and uninitialized variables fixes. Added WebRequest ($wgRequest)
object to encapsulate the handling of get/post variables:
The following grab something out of $_REQUEST. The first parameter is the
variable name and is required. The second is an optional default value:
$wgRequest->getVal() - any type, returns NULL if no default given
$wgRequest->getInt() - forced integer, 0 default
$wgRequest->getText() - runs through $wgLang->recodeInput()
$wgRequest->getBool() - return true/false
$wgRequest->getCheck() - returns true if the var is set, even if to ""
$wgRequest strips slashes at initialization if necessary.
Also in this fine object:
$wgRequest->wasPosted() - returns false if this wasn't a real form post,
so we can protect against faked submissions in get urls.
There's still plenty of work to do, not everything uses the new functions
yet. To test the strict mode, do define('DEBUG_GLOBALS', 1);
24 files changed: