Manual:$wgRequest
From MediaWiki.org
| Global object: $wgRequest | |
|---|---|
| WebRequest object, initialised in Setup.php
|
|
| Class: | WebRequest |
| Located in: | WebRequest.php |
[edit] Overview
$wgRequest is used as a global singleton that contains an instance of the WebRequest class. The WebRequest class encapsulates getting at data passed in the URL or via a POSTed form, handling removal of "magic quotes" slashes, stripping illegal input characters and normalizing Unicode sequences. See the WebRequest class documentation and Manual:WebRequest.php for more details.
[edit] Examples
This code can be useful within hook functions when you want to return without executing additional function code if the user is editing, rather than viewing, the current page.
global $wgRequest; if ($wgRequest->getText( 'action' )=='edit'){ return true; }
| Language: | English • 日本語 |
|---|