Go to the documentation of this file.
51 parent::__construct(
'Redirect' );
61 $parts = explode(
'/', $subpage, 2 );
62 $this->mType = count( $parts ) > 0 ? $parts[0] :
null;
63 $this->mValue = count( $parts ) > 1 ? $parts[1] :
null;
72 if ( !ctype_digit( $this->mValue ) ) {
76 $username =
$user->getName();
77 if (
$user->isAnon() ) {
102 $url =
$file->getURL();
104 $width = $request->getInt(
'width', -1 );
105 $height = $request->getInt(
'height', -1 );
108 if ( $width != -1 ) {
109 $mto =
$file->transform(
array(
'width' => $width,
'height' => $height ) );
111 if ( $mto && !$mto->isError() ) {
113 $url = $mto->getURL();
128 if ( !ctype_digit( $oldid ) ) {
131 $oldid = (int)$oldid;
132 if ( $oldid === 0 ) {
148 if ( !ctype_digit( $curid ) ) {
151 $curid = (int)$curid;
152 if ( $curid === 0 ) {
171 switch ( $this->mType ) {
185 $this->
getOutput()->setStatusCode( 404 );
194 if ( !is_null( $this->mValue ) ) {
195 $this->
getOutput()->setStatusCode( 404 );
211 'user' => $mp .
'-user',
212 'page' => $mp .
'-page',
213 'revision' => $mp .
'-revision',
214 'file' => $mp .
'-file',
219 'label-message' => $mp .
'-lookup',
220 'options' =>
array(),
221 'default' => current( array_keys( $ns ) ),
223 foreach ( $ns
as $n => $m ) {
224 $m = $this->
msg( $m )->text();
225 $a[
'type'][
'options'][$m] =
$n;
229 'label-message' => $mp .
'-value'
232 if ( !empty( $this->mType ) ) {
235 if ( !empty( $this->mValue ) ) {
243 if ( !empty( $data[
'type'] ) && !empty( $data[
'value'] ) ) {
244 $this->
setParameter( $data[
'type'] .
'/' . $data[
'value'] );
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
static newFromId( $id)
Static factory method for creation from a given user ID.
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.
usually copyright or history_copyright This message must be in HTML not wikitext $subpages will be ignored and the rest of subPageSubtitle() will run. 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' whether MediaWiki currently thinks this is a CSS JS page Hooks may change this value to override the return value of Title::isCssOrJsPage(). 'TitleIsAlwaysKnown' whether MediaWiki currently thinks this page is known isMovable() always returns false. $title whether MediaWiki currently thinks this page is movable Hooks may change this value to override the return value of Title::isMovable(). 'TitleIsWikitextPage' whether MediaWiki currently thinks this is a wikitext page Hooks may change this value to override the return value of Title::isWikitextPage() 'TitleMove' use UploadVerification and UploadVerifyFile instead $form
onSubmit(array $data)
Process the form on POST submission.
onSuccess()
Do something exciting on successful processing of the form, most likely to show a confirmation messag...
Special page which uses an HTMLForm to handle processing.
wfAppendQuery( $url, $query)
Append a query string to an existing URL, which may or may not already have query string parameters a...
getMessagePrefix()
Get message prefix for HTMLForm.
A special page that redirects to: the user for a numeric user id, the file for a given filename,...
wfScript( $script='index')
Get the path to a specified script file, respecting file extensions; this is a wrapper around $wgScri...
dispatch()
Use appropriate dispatch* method to obtain a redirection URL, and either: redirect,...
getFormFields()
Get an HTMLForm descriptor array.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
dispatchRevision()
Handle Special:Redirect/revision/xxx (by redirecting to index.php?oldid=xxx)
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
presenting them properly to the user as errors is done by the caller $title
msg()
Wrapper around wfMessage that sets the current context.
dispatchFile()
Handle Special:Redirect/file/xxxx.
getRequest()
Get the WebRequest being used for this instance.
dispatchUser()
Handle Special:Redirect/user/xxxx (by redirecting to User:YYYY)
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
dispatchPage()
Handle Special:Redirect/page/xxx (by redirecting to index.php?curid=xxx)
if(PHP_SAPI !='cli') $file
alterForm(HTMLForm $form)
Play with the HTMLForm if you need to more substantially.
Represents a title within MediaWiki.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
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
wfFindFile( $title, $options=array())
Find a file.
setParameter( $subpage)
Set $mType and $mValue based on parsed value of $subpage.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
static newFatal( $message)
Factory function for fatal errors.