Go to the documentation of this file.
40 if ( $redirect instanceof
Title ) {
41 $url = $redirect->getFullURL(
$query );
45 } elseif ( $redirect ===
true ) {
52 $class = get_class( $this );
53 throw new MWException(
"RedirectSpecialPage $class doesn't redirect!" );
75 foreach ( $this->mAllowedRedirectParams
as $arg ) {
76 if ( $this->
getRequest()->getVal( $arg,
null ) !==
null ) {
81 foreach ( $this->mAddedRedirectParams
as $arg => $val ) {
103 $allowedRedirectParams =
array(), $addedRedirectParams =
array()
105 parent::__construct(
$name );
108 $this->mAllowedRedirectParams = $allowedRedirectParams;
109 $this->mAddedRedirectParams = $addedRedirectParams;
113 if ( $this->redirSubpage ===
false ) {
190 parent::__construct(
$name );
191 $redirectParams =
array(
193 'redirect',
'rdfrom',
194 # Options
for preloaded
edits
195 'preload',
'editintro',
'preloadtitle',
'summary',
'nosummary',
197 'preview',
'internaledit',
'externaledit',
'mode',
'minor',
'watchthis',
198 # Options
for history/diffs
199 'section',
'oldid',
'diff',
'dir',
200 'limit',
'offset',
'feed',
203 # Options
for action=raw; missing ctype can
break JS or CSS
in some browsers
204 'ctype',
'maxage',
'smaxage',
207 wfRunHooks(
"RedirectSpecialArticleRedirectParams",
array( &$redirectParams ) );
208 $this->mAllowedRedirectParams = $redirectParams;
string $redirSubpage
Name of subpage of redirect target *.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
getOutput()
Get the OutputPage being used for this instance.
__construct( $name, $redirName, $redirSubpage=false, $allowedRedirectParams=array(), $addedRedirectParams=array())
getRedirect( $subpage)
If the special page is a redirect, then get the Title object it redirects to.
Shortcut to construct a special page which is unlisted by default.
execute( $par)
Default execute method Checks user permissions, calls the function given in mFunction.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name.
Shortcut to construct a special page alias.
wfAppendQuery( $url, $query)
Append a query string to an existing URL, which may or may not already have query string parameters a...
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global then executing the whole list after the page is displayed We don t do anything smart like collating updates to the same table or such because the list is almost always going to have just one item on if so it s not worth the trouble Since there is a job queue in the jobs which is used to update link tables of transcluding pages after edits
wfScript( $script='index')
Get the path to a specified script file, respecting file extensions; this is a wrapper around $wgScri...
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
string $redirName
Name of redirect target *.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration settings
Superclass for any RedirectSpecialPage which redirects the user to a particular article (as opposed t...
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 and we might be restricted by PHP settings such as safe mode or open_basedir We cannot assume that the software even has read access anywhere useful Many shared hosts run all users web applications under the same user
Allows to change the fields on the form that will be generated $name
We ve cleaned up the code here by removing clumps of infrequently used code and moving them off somewhere else It s much easier for someone working with this code to see what s _really_ going and make changes or fix bugs In we can take all the code that deals with the little used title reversing options(say) and put it in one place. Instead of having little title-reversing if-blocks spread all over the codebase in showAnArticle
I won t presume to tell you how to I m just describing the methods I chose to use for myself If you do choose to follow these it will probably be easier for you to collaborate with others on the but if you want to contribute without by all means do which work well I also use K &R brace matching style I know that s a religious issue for some
getRequest()
Get the WebRequest being used for this instance.
Represents a title within MediaWiki.
getRedirect( $par)
If the special page is a redirect, then get the Title object it redirects to.
Prior to maintenance scripts were a hodgepodge of code that had no cohesion or formal method of action Beginning in
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,...
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped add a value to it if you want to add a cookie that have to vary cache options can modify $query