Go to the documentation of this file.
44 if ( $redirect instanceof
Title ) {
45 $url = $redirect->getFullUrlForRedirect(
$query );
49 } elseif ( $redirect ===
true ) {
79 foreach ( array_merge( $this->mAllowedRedirectParams,
80 [
'uselang',
'useskin',
'debug' ]
82 if (
$request->getVal( $arg,
null ) !== null ) {
84 } elseif (
$request->getArray( $arg,
null ) !== null ) {
89 foreach ( $this->mAddedRedirectParams
as $arg => $val ) {
112 throw new MWException(
"RedirectSpecialPage $class doesn't redirect!" );
128 $allowedRedirectParams = [], $addedRedirectParams = []
130 parent::__construct(
$name );
133 $this->mAllowedRedirectParams = $allowedRedirectParams;
134 $this->mAddedRedirectParams = $addedRedirectParams;
142 if ( $this->redirSubpage ===
false ) {
215 parent::__construct(
$name );
218 'redirect',
'rdfrom',
219 # Options for preloaded edits
220 'preload',
'preloadparams',
'editintro',
'preloadtitle',
'summary',
'nosummary',
221 # Options for overriding user settings
222 'preview',
'minor',
'watchthis',
223 # Options for history/diffs
224 'section',
'oldid',
'diff',
'dir',
225 'limit',
'offset',
'feed',
228 # Options for action=raw; missing ctype can break JS or CSS in some browsers
229 'ctype',
'maxage',
'smaxage',
232 Hooks::run(
"RedirectSpecialArticleRedirectParams", [ &$redirectParams ] );
233 $this->mAllowedRedirectParams = $redirectParams;
string $redirSubpage
Name of subpage of redirect target.
__construct( $name, $redirName, $redirSubpage=false, $allowedRedirectParams=[], $addedRedirectParams=[])
getOutput()
Get the OutputPage being used for this instance.
Shortcut to construct a special page which is unlisted by default.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...
Allows to change the fields on the form that will be generated $name
Shortcut to construct a special page alias.
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
wfAppendQuery( $url, $query)
Append a query string to an existing URL, which may or may not already have query string parameters a...
null for the wiki Added should default to null in handler for backwards compatibility add a value to it if you want to add a cookie that have to vary cache options can modify $query
wfScript( $script='index')
Get the path to a specified script file, respecting file extensions; this is a wrapper around $wgScri...
string $redirName
Name of redirect target.
Superclass for any RedirectSpecialPage which redirects the user to a particular article (as opposed t...
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on $request
getRequest()
Get the WebRequest being used for this instance.
Represents a title within MediaWiki.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
getRedirectQuery()
Return part of the request string for a special redirect page This allows passing,...
you have access to all of the normal MediaWiki so you can get a DB use the etc For full docs on the Maintenance class
personallyIdentifiableTarget()
Indicate if the target of this redirect can be used to identify a particular user of this wiki (e....
getRedirect( $subpage)
If the special page is a redirect, then get the Title object it redirects to.
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.