MediaWiki  1.23.2
img_auth.php
Go to the documentation of this file.
1 <?php
42 define( 'MW_NO_OUTPUT_COMPRESSION', 1 );
43 require __DIR__ . '/includes/WebStart.php';
44 wfProfileIn( 'img_auth.php' );
45 
46 # Set action base paths so that WebRequest::getPathInfo()
47 # recognizes the "X" as the 'title' in ../img_auth.php/X urls.
48 $wgArticlePath = false; # Don't let a "/*" article path clober our action path
49 $wgActionPaths = array( "$wgUploadPath/" );
50 
51 wfImageAuthMain();
52 wfLogProfilingData();
53 // Commit and close up!
54 $factory = wfGetLBFactory();
55 $factory->commitMasterChanges();
56 $factory->shutdown();
57 
58 function wfImageAuthMain() {
59  global $wgImgAuthPublicTest, $wgImgAuthUrlPathMap, $wgRequest;
60 
61  // See if this is a public Wiki (no protections).
62  if ( $wgImgAuthPublicTest
63  && in_array( 'read', User::getGroupPermissions( array( '*' ) ), true )
64  ) {
65  // This is a public wiki, so disable this script (for private wikis only)
66  wfForbidden( 'img-auth-accessdenied', 'img-auth-public' );
67  return;
68  }
69 
70  // Get the requested file path (source file or thumbnail)
71  $matches = WebRequest::getPathInfo();
72  if ( !isset( $matches['title'] ) ) {
73  wfForbidden( 'img-auth-accessdenied', 'img-auth-nopathinfo' );
74  return;
75  }
76  $path = $matches['title'];
77  if ( $path && $path[0] !== '/' ) {
78  // Make sure $path has a leading /
79  $path = "/" . $path;
80  }
81 
82  // Check for bug 28235: QUERY_STRING overriding the correct extension
83  $whitelist = array();
84  $extension = FileBackend::extensionFromPath( $path );
85  if ( $extension != '' ) {
86  $whitelist[] = $extension;
87  }
88  if ( !$wgRequest->checkUrlExtension( $whitelist ) ) {
89  return;
90  }
91 
92  // Various extensions may have their own backends that need access.
93  // Check if there is a special backend and storage base path for this file.
94  foreach ( $wgImgAuthUrlPathMap as $prefix => $storageDir ) {
95  $prefix = rtrim( $prefix, '/' ) . '/'; // implicit trailing slash
96  if ( strpos( $path, $prefix ) === 0 ) {
97  $be = FileBackendGroup::singleton()->backendFromPath( $storageDir );
98  $filename = $storageDir . substr( $path, strlen( $prefix ) ); // strip prefix
99  // Check basic user authorization
100  if ( !RequestContext::getMain()->getUser()->isAllowed( 'read' ) ) {
101  wfForbidden( 'img-auth-accessdenied', 'img-auth-noread', $path );
102  return;
103  }
104  if ( $be->fileExists( array( 'src' => $filename ) ) ) {
105  wfDebugLog( 'img_auth', "Streaming `" . $filename . "`." );
106  $be->streamFile( array( 'src' => $filename ),
107  array( 'Cache-Control: private', 'Vary: Cookie' ) );
108  } else {
109  wfForbidden( 'img-auth-accessdenied', 'img-auth-nofile', $path );
110  }
111  return;
112  }
113  }
114 
115  // Get the local file repository
116  $repo = RepoGroup::singleton()->getRepo( 'local' );
117 
118  // Get the full file storage path and extract the source file name.
119  // (e.g. 120px-Foo.png => Foo.png or page2-120px-Foo.png => Foo.png).
120  // This only applies to thumbnails, and all thumbnails should
121  // be under a folder that has the source file name.
122  if ( strpos( $path, '/thumb/' ) === 0 ) {
123  $name = wfBaseName( dirname( $path ) ); // file is a thumbnail
124  $filename = $repo->getZonePath( 'thumb' ) . substr( $path, 6 ); // strip "/thumb"
125  } else {
126  $name = wfBaseName( $path ); // file is a source file
127  $filename = $repo->getZonePath( 'public' ) . $path;
128  }
129 
130  // Check to see if the file exists
131  if ( !$repo->fileExists( $filename ) ) {
132  wfForbidden( 'img-auth-accessdenied', 'img-auth-nofile', $filename );
133  return;
134  }
135 
136  $title = Title::makeTitleSafe( NS_FILE, $name );
137  if ( !$title instanceof Title ) { // files have valid titles
138  wfForbidden( 'img-auth-accessdenied', 'img-auth-badtitle', $name );
139  return;
140  }
141 
142  // Run hook for extension authorization plugins
144  $result = null;
145  if ( !wfRunHooks( 'ImgAuthBeforeStream', array( &$title, &$path, &$name, &$result ) ) ) {
146  wfForbidden( $result[0], $result[1], array_slice( $result, 2 ) );
147  return;
148  }
149 
150  // Check user authorization for this title
151  // Checks Whitelist too
152  if ( !$title->userCan( 'read' ) ) {
153  wfForbidden( 'img-auth-accessdenied', 'img-auth-noread', $name );
154  return;
155  }
156 
157  if ( $wgRequest->getCheck( 'download' ) ) {
158  header( 'Content-Disposition: attachment' );
159  }
160 
161  // Stream the requested file
162  wfDebugLog( 'img_auth', "Streaming `" . $filename . "`." );
163  $repo->streamFile( $filename, array( 'Cache-Control: private', 'Vary: Cookie' ) );
164 }
165 
173 function wfForbidden( $msg1, $msg2 ) {
174  global $wgImgAuthDetails;
175 
176  $args = func_get_args();
177  array_shift( $args );
178  array_shift( $args );
179  $args = ( isset( $args[0] ) && is_array( $args[0] ) ) ? $args[0] : $args;
180 
181  $msgHdr = wfMessage( $msg1 )->escaped();
182  $detailMsgKey = $wgImgAuthDetails ? $msg2 : 'badaccess-group0';
183  $detailMsg = wfMessage( $detailMsgKey, $args )->escaped();
184 
185  wfDebugLog( 'img_auth',
186  "wfForbidden Hdr: " . wfMessage( $msg1 )->inLanguage( 'en' )->text() . " Msg: " .
187  wfMessage( $msg2, $args )->inLanguage( 'en' )->text()
188  );
189 
190  header( 'HTTP/1.0 403 Forbidden' );
191  header( 'Cache-Control: no-cache' );
192  header( 'Content-Type: text/html; charset=utf-8' );
193  echo <<<ENDS
194 <html>
195 <body>
196 <h1>$msgHdr</h1>
197 <p>$detailMsg</p>
198 </body>
199 </html>
200 ENDS;
201 }
UploadBase
Definition: UploadBase.php:38
Article\showMissingArticle
showMissingArticle()
Show the error text for a missing article.
Definition: Article.php:1179
basis
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 basis
Definition: skin.txt:10
MWTimestamp
Library for creating and parsing MW-style timestamps.
Definition: MWTimestamp.php:31
strings
it sets a lot of them automatically from query strings
Definition: design.txt:93
ApiMain
This is the main API class, used for both external and internal processing.
Definition: ApiMain.php:41
Title\getLocalURL
getLocalURL( $query='', $query2=false)
Get a URL with no fragment or server name (relative URL) from a Title object.
Definition: Title.php:1637
LinkCache
Cache for article titles (prefixed DB keys) and ids linked from one source.
Definition: LinkCache.php:29
classes
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 which are documented in DefaultSettings php There is no comprehensive documentation for the remaining however some of the most important ones are listed below They are typically initialised either in index php or in Setup php For a description of the classes
Definition: globals.txt:25
ContentHandler
A content handler knows how do deal with a specific type of content on a wiki page.
Definition: ContentHandler.php:55
save
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 save
Definition: deferred.txt:4
TitleIsMovable
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 TitleIsMovable
Definition: hooks.txt:2551
$wgUser
$wgUser
Definition: Setup.php:552
Page
Abstract class for type hinting (accepts WikiPage, Article, ImagePage, CategoryPage)
Definition: WikiPage.php:26
object
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 which are documented in DefaultSettings php There is no comprehensive documentation for the remaining however some of the most important ones are listed below They are typically initialised either in index php or in Setup php For a description of the see design txt $wgTitle Title object created from the request URL $wgOut OutputPage object for HTTP response $wgUser User object for the user associated with the current request $wgLang Language object selected by user preferences $wgContLang Language object associated with the wiki being viewed $wgParser Parser object Parser extensions register their hooks here $wgRequest WebRequest object
Definition: globals.txt:25
ThumbnailImage
Media transform output for images.
Definition: MediaTransformOutput.php:250
$result
The index of the header message $result[1]=The index of the body text message $result[2 through n]=Parameters passed to body text message. Please note the header message cannot receive/use parameters. 'ImportHandleLogItemXMLTag':When parsing a XML tag in a log item. $reader:XMLReader object $logInfo:Array of information Return false to stop further processing of the tag 'ImportHandlePageXMLTag':When parsing a XML tag in a page. $reader:XMLReader object $pageInfo:Array of information Return false to stop further processing of the tag 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information Return false to stop further processing of the tag 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. $reader:XMLReader object Return false to stop further processing of the tag 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. $reader:XMLReader object $revisionInfo:Array of information Return false to stop further processing of the tag 'InfoAction':When building information to display on the action=info page. $context:IContextSource object & $pageInfo:Array of information 'InitializeArticleMaybeRedirect':MediaWiki check to see if title is a redirect. $title:Title object for the current page $request:WebRequest $ignoreRedirect:boolean to skip redirect check $target:Title/string of redirect target $article:Article object 'InterwikiLoadPrefix':When resolving if a given prefix is an interwiki or not. Return true without providing an interwiki to continue interwiki search. $prefix:interwiki prefix we are looking for. & $iwData:output array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid. 'InternalParseBeforeSanitize':during Parser 's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/onlyinclude and other processings. Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InternalParseBeforeLinks':during Parser 's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processings. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InvalidateEmailComplete':Called after a user 's email has been invalidated successfully. $user:user(object) whose email is being invalidated 'IRCLineURL':When constructing the URL to use in an IRC notification. Callee may modify $url and $query, URL will be constructed as $url . $query & $url:URL to index.php & $query:Query string $rc:RecentChange object that triggered url generation 'IsFileCacheable':Override the result of Article::isFileCacheable()(if true) $article:article(object) being checked 'IsTrustedProxy':Override the result of wfIsTrustedProxy() $ip:IP being check $result:Change this value to override the result of wfIsTrustedProxy() 'IsUploadAllowedFromUrl':Override the result of UploadFromUrl::isAllowedUrl() $url:URL used to upload from & $allowed:Boolean indicating if uploading is allowed for given URL 'isValidEmailAddr':Override the result of User::isValidEmailAddr(), for instance to return false if the domain name doesn 't match your organization. $addr:The e-mail address entered by the user & $result:Set this and return false to override the internal checks 'isValidPassword':Override the result of User::isValidPassword() $password:The password entered by the user & $result:Set this and return false to override the internal checks $user:User the password is being validated for 'Language::getMessagesFileName':$code:The language code or the language we 're looking for a messages file for & $file:The messages file path, you can override this to change the location. 'LanguageGetNamespaces':Provide custom ordering for namespaces or remove namespaces. Do not use this hook to add namespaces. Use CanonicalNamespaces for that. & $namespaces:Array of namespaces indexed by their numbers 'LanguageGetMagic':DEPRECATED, use $magicWords in a file listed in $wgExtensionMessagesFiles instead. Use this to define synonyms of magic words depending of the language $magicExtensions:associative array of magic words synonyms $lang:language code(string) 'LanguageGetSpecialPageAliases':DEPRECATED, use $specialPageAliases in a file listed in $wgExtensionMessagesFiles instead. Use to define aliases of special pages names depending of the language $specialPageAliases:associative array of magic words synonyms $lang:language code(string) 'LanguageGetTranslatedLanguageNames':Provide translated language names. & $names:array of language code=> language name $code language of the preferred translations 'LanguageLinks':Manipulate a page 's language links. This is called in various places to allow extensions to define the effective language links for a page. $title:The page 's Title. & $links:Associative array mapping language codes to prefixed links of the form "language:title". & $linkFlags:Associative array mapping prefixed links to arrays of flags. Currently unused, but planned to provide support for marking individual language links in the UI, e.g. for featured articles. 'LinkBegin':Used when generating internal and interwiki links in Linker::link(), before processing starts. Return false to skip default processing and return $ret. See documentation for Linker::link() for details on the expected meanings of parameters. $skin:the Skin object $target:the Title that the link is pointing to & $html:the contents that the< a > tag should have(raw HTML) $result
Definition: hooks.txt:1528
check
in this case you re responsible for computing and outputting the entire conflict i the difference between revisions and your text headers and sections and Diff overridable Default is either copyrightwarning or copyrightwarning2 overridable Default is editpage tos summary such as anonymity and the real check
Definition: hooks.txt:1038
$time
see documentation in includes Linker php for Linker::makeImageLink & $time
Definition: hooks.txt:1358
ID
occurs before session is loaded can be modified ID
Definition: hooks.txt:2818
UserSetEmailAuthenticationTimestamp
return false to override stock group removal can be modified modifiable will be added to $_SESSION change this to override new email address UserSetEmailAuthenticationTimestamp
Definition: hooks.txt:2838
Title\newFromText
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
Definition: Title.php:189
SpecialPageFactory
Factory for handling the special page list and generating SpecialPage objects.
Definition: SpecialPageFactory.php:46
Linker
Some internal bits split of from Skin.php.
Definition: Linker.php:32
$localize
namespace are movable Hooks may change this value to override the return value of MWNamespace::isMovable(). 'NewRevisionFromEditComplete' if it s text intended for display in a monospaced font $localize
Definition: hooks.txt:1746
data
and how to run hooks for an and one after Each event has a preferably in CamelCase For ArticleDelete hook A clump of code and data that should be run when an event happens This can be either a function and a chunk of data
Definition: hooks.txt:6
of
globals txt Globals are evil The original MediaWiki code relied on globals for processing context far too often MediaWiki development since then has been a story of slowly moving context out of global variables and into objects Storing processing context in object member variables allows those objects to be reused in a much more flexible way Consider the elegance of
Definition: globals.txt:10
article
and how to run hooks for an and one after Each event has a preferably in CamelCase For ArticleDelete hook A clump of code and data that should be run when an event happens This can be either a function and a chunk of or an object and a method hook function The function part of a third party developers and administrators to define code that will be run at certain points in the mainline and to modify the data run by that mainline code Hooks can keep mainline code and make it easier to write extensions Hooks are a principled alternative to patches for two options in MediaWiki One reverses the order of a title before displaying the article
Definition: hooks.txt:23
cookies
it sets a lot of them automatically from cookies
Definition: design.txt:93
ParserOutput
Definition: ParserOutput.php:24
directory
The most up to date schema for the tables in the database will always be tables sql in the maintenance directory
Definition: schema.txt:2
Title\getInternalURL
getInternalURL( $query='', $query2=false)
Get the URL form for an internal link.
Definition: Title.php:1782
yourself
</td >< td > &</td >< td > t want your writing to be edited mercilessly and redistributed at then don &You are also promising us that you wrote this yourself
Definition: All_system_messages.txt:914
php
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
Definition: skin.txt:62
User\isValidPassword
isValidPassword( $password)
Is the input a valid password for this user?
Definition: User.php:690
$files
$files
Definition: importImages.php:67
servers
storage can be distributed across multiple servers
Definition: memcached.txt:33
content
per default it will return the text for text based content
Definition: contenthandler.txt:107
$mime
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 where the first element is the message key and the remaining elements are used as parameters to the message based on mime etc Preferred in most cases over UploadVerification object with all info about the upload string $mime
Definition: hooks.txt:2573
else
if( $out) else
Definition: UtfNormalGenerate.php:189
$html
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
Definition: hooks.txt:1530
Template
! article Main Page ! text blah blah ! endarticle !article Template
Definition: parserTests.txt:209
LinkBatch
Class representing a list of titles The execute() method checks them all for existence and adds them ...
Definition: LinkBatch.php:30
$tables
namespace and then decline to actually register it RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist & $tables
Definition: hooks.txt:815
PageArchive
Used to show archived pages and eventually restore them.
Definition: SpecialUndelete.php:29
PHP
The ContentHandler facility adds support for arbitrary content types on wiki instead of relying on wikitext for everything It was introduced in MediaWiki Each kind of and so on Built in content types as usual *javascript user provided javascript code *css user provided css code *text plain text In PHP
Definition: contenthandler.txt:5
SpecialRecentChangesLinked
This is to display changes made to all articles linked in an article.
Definition: SpecialRecentchangeslinked.php:29
DatabaseUpdater
Class for handling database updates.
Definition: DatabaseUpdater.php:33
is
We use the convention $dbr for read and $dbw for write to help you keep track of whether the database object is a the world will explode Or to be a subsequent write query which succeeded on the master may fail when replicated to the slave due to a unique key collision Replication on the slave will stop and it may take hours to repair the database and get it back online Setting read_only in my cnf on the slave will avoid this but given the dire we prefer to have as many checks as possible We provide a but the wrapper functions like please read the documentation for except in special pages derived from QueryPage It s a common pitfall for new developers to submit code containing SQL queries which examine huge numbers of rows Remember that COUNT * is(N), counting rows in atable is like counting beans in a bucket.------------------------------------------------------------------------ Replication------------------------------------------------------------------------The largest installation of MediaWiki, Wikimedia, uses a large set ofslave MySQL servers replicating writes made to a master MySQL server. Itis important to understand the issues associated with this setup if youwant to write code destined for Wikipedia.It 's often the case that the best algorithm to use for a given taskdepends on whether or not replication is in use. Due to our unabashedWikipedia-centrism, we often just use the replication-friendly version, but if you like, you can use wfGetLB() ->getServerCount() > 1 tocheck to see if replication is in use.===Lag===Lag primarily occurs when large write queries are sent to the master.Writes on the master are executed in parallel, but they are executed inserial when they are replicated to the slaves. The master writes thequery to the binlog when the transaction is committed. The slaves pollthe binlog and start executing the query as soon as it appears. They canservice reads while they are performing a write query, but will not readanything more from the binlog and thus will perform no more writes. Thismeans that if the write query runs for a long time, the slaves will lagbehind the master for the time it takes for the write query to complete.Lag can be exacerbated by high read load. MediaWiki 's load balancer willstop sending reads to a slave when it is lagged by more than 30 seconds.If the load ratios are set incorrectly, or if there is too much loadgenerally, this may lead to a slave permanently hovering around 30seconds lag.If all slaves are lagged by more than 30 seconds, MediaWiki will stopwriting to the database. All edits and other write operations will berefused, with an error returned to the user. This gives the slaves achance to catch up. Before we had this mechanism, the slaves wouldregularly lag by several minutes, making review of recent editsdifficult.In addition to this, MediaWiki attempts to ensure that the user seesevents occurring on the wiki in chronological order. A few seconds of lagcan be tolerated, as long as the user sees a consistent picture fromsubsequent requests. This is done by saving the master binlog positionin the session, and then at the start of each request, waiting for theslave to catch up to that position before doing any reads from it. Ifthis wait times out, reads are allowed anyway, but the request isconsidered to be in "lagged slave mode". Lagged slave mode can bechecked by calling wfGetLB() ->getLaggedSlaveMode(). The onlypractical consequence at present is a warning displayed in the pagefooter.===Lag avoidance===To avoid excessive lag, queries which write large numbers of rows shouldbe split up, generally to write one row at a time. Multi-row INSERT ...SELECT queries are the worst offenders should be avoided altogether.Instead do the select first and then the insert.===Working with lag===Despite our best efforts, it 's not practical to guarantee a low-lagenvironment. Lag will usually be less than one second, but mayoccasionally be up to 30 seconds. For scalability, it 's very importantto keep load on the master low, so simply sending all your queries tothe master is not the answer. So when you have a genuine need forup-to-date data, the following approach is advised:1) Do a quick query to the master for a sequence number or timestamp 2) Run the full query on the slave and check if it matches the data you gotfrom the master 3) If it doesn 't, run the full query on the masterTo avoid swamping the master every time the slaves lag, use of thisapproach should be kept to a minimum. In most cases you should just readfrom the slave and let the user deal with the delay.------------------------------------------------------------------------ Lock contention------------------------------------------------------------------------Due to the high write rate on Wikipedia(and some other wikis), MediaWiki developers need to be very careful to structure their writesto avoid long-lasting locks. By default, MediaWiki opens a transactionat the first query, and commits it before the output is sent. Locks willbe held from the time when the query is done until the commit. So youcan reduce lock time by doing as much processing as possible before youdo your write queries.Often this approach is not good enough, and it becomes necessary toenclose small groups of queries in their own transaction. Use thefollowing syntax:$dbw=wfGetDB(DB_MASTER
view
$article view()
understand
Having all this code related to the title reversion option in one place means that it s easier to read and understand
Definition: hooks.txt:116
software
</td >< td > this can then be imported into another wiki running MediaWiki software
Definition: All_system_messages.txt:1488
SearchGetNearMatchComplete
set to $title object and return false for a match SearchGetNearMatchComplete
Definition: hooks.txt:2149
ContribsPager\reallyDoQuery
reallyDoQuery( $offset, $limit, $descending)
This method basically executes the exact same code as the parent class, though with a hook added,...
Definition: SpecialContributions.php:713
$wgMemc
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 which are documented in DefaultSettings php There is no comprehensive documentation for the remaining however some of the most important ones are listed below They are typically initialised either in index php or in Setup php For a description of the see design txt $wgTitle Title object created from the request URL $wgOut OutputPage object for HTTP response $wgUser User object for the user associated with the current request $wgLang Language object selected by user preferences $wgContLang Language object associated with the wiki being viewed $wgParser Parser object Parser extensions register their hooks here $wgRequest WebRequest to get request data $wgMemc
Definition: globals.txt:25
stored
The ContentHandler facility adds support for arbitrary content types on wiki instead of relying on wikitext for everything It was introduced in MediaWiki Each kind of stored
Definition: contenthandler.txt:5
it
MediaWiki has optional support for a high distributed memory object caching system For general information on it
Definition: memcached.txt:1
text
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
Definition: design.txt:12
CACHE_NONE
const CACHE_NONE
Definition: Defines.php:112
ImageGalleryBase
Image gallery.
Definition: ImageGalleryBase.php:30
$timestamp
if( $limit) $timestamp
Definition: importImages.php:104
it
presenting them properly to the user as errors is done by the caller return true but is called only if expensive checks are enabled Add a permissions error when permissions errors are checked for Return false if the user can t do it
Definition: hooks.txt:1324
support
This document describes the state of Postgres support in and is fairly well maintained The main code is very well while extensions are very hit and miss it is probably the most supported database after MySQL Much of the work in making MediaWiki database agnostic came about through the work of creating Postgres support
Definition: postgres.txt:14
RecentChange
Utility class for creating new RC entries.
Definition: RecentChange.php:63
ldapLogin
function ldapLogin($username, $password)
Definition: hooks.txt:193
$form
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
Definition: hooks.txt:2573
Category
Category objects are immutable, strictly speaking.
Definition: Category.php:31
case
it s the revision text itself In either case
Definition: hooks.txt:2113
wiki
Prior to maintenance scripts were a hodgepodge of code that had no cohesion or formal method of action Beginning maintenance scripts have been cleaned up to use a unified class Directory structure How to run a script How to write your own DIRECTORY STRUCTURE The maintenance directory of a MediaWiki installation contains several all of which have unique purposes HOW TO RUN A SCRIPT Ridiculously just call php someScript php that s in the top level maintenance directory if not default wiki
Definition: maintenance.txt:1
UploadVerifyFile
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 where the first element is the message key and the remaining elements are used as parameters to the message UploadVerifyFile
Definition: hooks.txt:2573
well
page as well
Definition: All_system_messages.txt:2732
rollback
presenting them properly to the user as errors is done by the caller return true use this to change the list i e rollback
Definition: hooks.txt:1337
WRONG_PASS
div flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LoginAuthenticateAudit' this hook is for auditing only WRONG_PASS
Definition: hooks.txt:1632
Currently
the other converts the title to all uppercase letters Currently
Definition: hooks.txt:34
wfProfileIn
wfProfileIn( $functionname)
Begin profiling of a function.
Definition: Profiler.php:33
token
as a message key or array as accepted by ApiBase::dieUsageMsg after processing request parameters Return false to let the request returning an error message or an< edit result="Failure"> tag if $resultArr was filled which will be used in the intoken parameter and in the and a callback function which should return the token
Definition: hooks.txt:421
$defaultOptions
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output return false to not delete it return false to override the default password checks this Boolean value will be checked to determine if the password was valid return false to implement your own hashing method this String will be used as the hash which may be added to this hook is run right before returning the options to the caller which means it s potentially called dozens or hundreds of times You may want to cache the results of non trivial operations in your hook function for this reason & $defaultOptions
Definition: hooks.txt:2697
saved
This code would result in ircNotify being run twice when an article is saved
Definition: hooks.txt:177
contents
Some information about database access in MediaWiki By Tim January Database layout For information about the MediaWiki database such as a description of the tables and their contents
Definition: database.txt:2
WikiPage\doEditContent
doEditContent(Content $content, $summary, $flags=0, $baseRevId=false, User $user=null, $serialisation_format=null)
Change an existing article or create a new article.
Definition: WikiPage.php:1685
CategoryPage
Special handling for category description pages, showing pages, subcategories and file that belong to...
Definition: CategoryPage.php:28
$ret
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
Definition: hooks.txt:1530
MarkPatrolled
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title MarkPatrolled
Definition: hooks.txt:1679
release
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 release
Definition: skin.txt:10
$from
$from
Definition: importImages.php:90
ChangesListSpecialPage
Special page which uses a ChangesList to show query results.
Definition: ChangesListSpecialPage.php:30
UploadForm
Sub class of HTMLForm that provides the form section of SpecialUpload.
Definition: SpecialUpload.php:740
system
processing should stop and the error should be shown to the user if you wanted to authenticate users to a custom system(LDAP, another PHP program, whatever)
anything
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 so they can t rely on Unix and must forbid reads to even standard directories like tmp lest users read each others files We cannot assume that the user has the ability to install or run any programs not written as web accessible PHP scripts Since anything that works on cheap shared hosting will work if you have shell or root access MediaWiki s design is based around catering to the lowest common denominator Although we support higher end setups as the way many things work by default is tailored toward shared hosting These defaults are unconventional from the point of view of and they certainly aren t ideal for someone who s installing MediaWiki as MediaWiki does not conform to normal Unix filesystem layout Hopefully we ll offer direct support for standard layouts in the but for now *any change to the location of files is unsupported *Moving things and leaving symlinks will *probably *not break anything
Definition: distributors.txt:39
Debian
MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like it should help lighten the load on the database servers by caching data and objects in Debian
Definition: memcached.txt:10
$customAttribs
null means default & $customAttribs
Definition: hooks.txt:1530
UserRights
return false to override stock group removal can be modified UserRights
Definition: hooks.txt:2838
WikiPage
Class representing a MediaWiki article and history.
Definition: WikiPage.php:37
$personal_urls
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values my talk my contributions etc & $personal_urls
Definition: hooks.txt:1956
$right
return false if a UserGetRights hook might remove the named right $right
Definition: hooks.txt:2798
LinksUpdate
See docs/deferred.txt.
Definition: LinksUpdate.php:28
normal
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 so they can t rely on Unix and must forbid reads to even standard directories like tmp lest users read each others files We cannot assume that the user has the ability to install or run any programs not written as web accessible PHP scripts Since anything that works on cheap shared hosting will work if you have shell or root access MediaWiki s design is based around catering to the lowest common denominator Although we support higher end setups as the way many things work by default is tailored toward shared hosting These defaults are unconventional from the point of view of normal(non-web) applications -- they might conflict with distributors' policies
load
MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy load
Definition: memcached.txt:1
ArticleSave
and how to run hooks for an and one after Each event has a preferably in CamelCase For ArticleSave
Definition: hooks.txt:6
$messageMemc
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 which are documented in DefaultSettings php There is no comprehensive documentation for the remaining however some of the most important ones are listed below They are typically initialised either in index php or in Setup php For a description of the see design txt $wgTitle Title object created from the request URL $wgOut OutputPage object for HTTP response $wgUser User object for the user associated with the current request $wgLang Language object selected by user preferences $wgContLang Language object associated with the wiki being viewed $wgParser Parser object Parser extensions register their hooks here $wgRequest WebRequest to get request data $messageMemc
Definition: globals.txt:25
$resourceLoader
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values my talk my contributions etc etc otherwise the built in rate limiting checks are if enabled also a ContextSource error or success such as when responding to a resource loader request or generating HTML output & $resourceLoader
Definition: hooks.txt:1956
GetLocalURL
if the prop value should be in the metadata multi language array can modify can modify indexed by page_id indexed by prefixed DB keys GetLocalURL
Definition: hooks.txt:1230
IP
A collection of public static functions to play with IP address and IP blocks.
Definition: IP.php:65
$params
$params
Definition: styleTest.css.php:40
cssjanus.usage
def usage()
Definition: cssjanus.py:520
$limit
if( $sleep) $limit
Definition: importImages.php:99
strategy
Using a hook running strategy
Definition: hooks.txt:73
Preview
in this case you re responsible for computing and outputting the entire conflict i the difference between revisions and your text headers and sections Preview
Definition: hooks.txt:1038
n
if(! $in) print Initializing normalization quick check tables n
Definition: UtfNormalGenerate.php:36
$parserMemc
controlled by $wgMainCacheType * $parserMemc
Definition: memcached.txt:78
APIEditBeforeSave
as a message key or array as accepted by ApiBase::dieUsageMsg APIEditBeforeSave
Definition: hooks.txt:375
functions
you have access to all of the normal MediaWiki functions
Definition: maintenance.txt:52
name
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 the name of the file will automatically be added as a skin name
Definition: skin.txt:62
e
in this case you re responsible for computing and outputting the entire conflict i e
Definition: hooks.txt:1038
func
as a message key or array as accepted by ApiBase::dieUsageMsg after processing request parameters Return false to let the request returning an error message or an< edit result="Failure"> tag if $resultArr was filled which will be used in the intoken parameter and in the and a callback function which should return the or false if the user isn t allowed to obtain it The prototype of the callback function is func($pageid, $title)
UserEffectiveGroups
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output return false to not delete it return false to override the default password checks this Boolean value will be checked to determine if the password was valid return false to implement your own hashing method this String will be used as the hash UserEffectiveGroups
Definition: hooks.txt:2697
getSkin
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser getSkin(). See also skin.txt. Language Represents the language used for incidental text
$s
$s
Definition: mergeMessageFileList.php:156
RepoGroup\findFile
findFile( $title, $options=array())
Search repositories for an image.
Definition: RepoGroup.php:114
fail
as a message key or array as accepted by ApiBase::dieUsageMsg after processing request parameters Return false to let the request fail
Definition: hooks.txt:375
UserLoginComplete
occurs before session is loaded can be modified UserLoginComplete
Definition: hooks.txt:2818
code
linkcache txt The LinkCache class maintains a list of article titles and the information about whether or not the article exists in the database This is used to mark up links when displaying a page If the same link appears more than once on any page then it only has to be looked up once In most cases link lookups are done in batches with the LinkBatch class or the equivalent in so the link cache is mostly useful for short snippets of parsed and for links in the navigation areas of the skin The link cache was formerly used to track links used in a document for the purposes of updating the link tables This application is now deprecated To create a you can use the following code
Definition: linkcache.txt:14
ImagePage
Class for viewing MediaWiki file description pages.
Definition: ImagePage.php:28
Maintenance
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
Definition: maintenance.txt:39
UserCreateForm
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output return false to not delete it return false to override the default password checks this Boolean value will be checked to determine if the password was valid UserCreateForm
Definition: hooks.txt:2697
insert
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form externallinks including delete and insert
Definition: hooks.txt:1530
using
You can also disable dropped in or core skins using
Definition: skin.txt:66
$wgContLang
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the content language as $wgContLang
Definition: design.txt:56
$wgHooks
$wgHooks['ArticleShow'][]
Definition: hooks.txt:110
StripState
Definition: StripState.php:28
queries
Use of locking define a new flag for $wgAntiLockFlags which allows them to be turned because we ll almost certainly need to do so on the Wikimedia cluster Instead of locking combine your existence checks into your write queries
Definition: database.txt:164
messages
namespace and then decline to actually register it RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist but no entry for that model exists in $wgContentHandlers if desired whether it is OK to use $contentModel on $title Handler functions that modify $ok should generally return false to prevent further hooks from further modifying $ok in case the handler function wants to provide a converted Content object Note that $result getContentModel() must return $toModel. Handler functions that modify $result should generally return false to further attempts at conversion. 'ContribsPager you ll need to handle error messages
Definition: hooks.txt:896
AbortAutoAccount
please add to it if you re going to add events to the MediaWiki code AbortAutoAccount
Definition: hooks.txt:237
occurs
When an event occurs
Definition: hooks.txt:150
CategoryPage\view
view()
This is the default action of the index.php entry point: just view the page of the given title.
Definition: CategoryPage.php:53
EmailConfirmed
in this case you re responsible for computing and outputting the entire conflict i the difference between revisions and your text headers and sections and Diff overridable Default is either copyrightwarning or copyrightwarning2 overridable Default is editpage tos summary EmailConfirmed
Definition: hooks.txt:1038
$flags
it s the revision text itself In either if gzip is the revision text is gzipped $flags
Definition: hooks.txt:2113
default
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 so they can t rely on Unix and must forbid reads to even standard directories like tmp lest users read each others files We cannot assume that the user has the ability to install or run any programs not written as web accessible PHP scripts Since anything that works on cheap shared hosting will work if you have shell or root access MediaWiki s design is based around catering to the lowest common denominator Although we support higher end setups as the way many things work by default is tailored toward shared hosting These defaults are unconventional from the point of view of and they certainly aren t ideal for someone who s installing MediaWiki as MediaWiki does not conform to normal Unix filesystem layout Hopefully we ll offer direct support for standard layouts in the but for now *any change to the location of files is unsupported *Moving things and leaving symlinks will *probably *not break but it is *strongly *advised not to try any more intrusive changes to get MediaWiki to conform more closely to your filesystem hierarchy Any such attempt will almost certainly result in unnecessary bugs The standard recommended location to install relative to the web is it should be possible to enable the appropriate rewrite rules by default
Definition: distributors.txt:53
$link
set to $title object and return false for a match for latest after cache objects are set use the ContentHandler facility to handle CSS and JavaScript for highlighting & $link
Definition: hooks.txt:2149
cache
you have access to all of the normal MediaWiki so you can get a DB use the cache
Definition: maintenance.txt:52
type
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 where the first element is the message key and the remaining elements are used as parameters to the message based on mime type
Definition: hooks.txt:2573
QueryPage
This is a class for doing query pages; since they're almost all the same, we factor out some of the f...
Definition: QueryPage.php:30
$tabindex
in this case you re responsible for computing and outputting the entire conflict i the difference between revisions and your text headers and sections and Diff & $tabindex
Definition: hooks.txt:1038
processing
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after processing
Definition: hooks.txt:1530
foreach
foreach( $pages as $page)
Definition: linkcache.txt:19
memory
MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like it should help lighten the load on the database servers by caching data and objects in memory
Definition: memcached.txt:10
hook
and how to run hooks for an and one after Each event has a preferably in CamelCase For ArticleDelete hook A clump of code and data that should be run when an event happens This can be either a function and a chunk of or an object and a method hook function The function part of a hook
Definition: hooks.txt:23
Collation
Definition: Collation.php:23
ProtectionForm
Handles the page protection UI and backend.
Definition: ProtectionForm.php:29
pre
</p > ! end ! test Empty pre
Definition: parserTests.txt:1579
skins
skin txt MediaWiki includes four core skins
Definition: skin.txt:5
edited
The ContentHandler facility adds support for arbitrary content types on wiki instead of relying on wikitext for everything It was introduced in MediaWiki Each kind of edited
Definition: contenthandler.txt:5
example
and how to run hooks for an and one after Each event has a preferably in CamelCase For example
Definition: hooks.txt:6
true
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return true
Definition: hooks.txt:1530
$wgArticle
$wgArticle
Definition: globals.txt:21
DataUpdate
Abstract base class for update jobs that do something with some secondary data extracted from article...
Definition: DataUpdate.php:32
permissions
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 so they can t rely on Unix permissions
Definition: distributors.txt:9
ApiPageSet
This class contains a list of pages that the client has requested.
Definition: ApiPageSet.php:41
ApiBase
This abstract class implements many basic API functions, and is the base of all API classes.
Definition: ApiBase.php:42
pages
The ContentHandler facility adds support for arbitrary content types on wiki pages
Definition: contenthandler.txt:1
do
processing should stop and the error should be shown to the user if you wanted to authenticate users to a custom you could do
Definition: hooks.txt:191
part
in this case you re responsible for computing and outputting the entire conflict part
Definition: hooks.txt:1038
key
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form externallinks including delete and has completed for all link tables default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message key
Definition: hooks.txt:1624
Action
Actions are things which can be done to pages (edit, delete, rollback, etc).
Definition: Action.php:37
if
if($wgReverseTitle)
Definition: hooks.txt:58
Status
Generic operation result class Has warning/error list, boolean status and arbitrary value.
Definition: Status.php:40
below
controlled by $wgMainCacheType controlled by $wgParserCacheType controlled by $wgMessageCacheType If you set CACHE_NONE to one of the three control default value for MediaWiki still create a but requests to it are no ops and we always fall through to the database If the cache daemon can t be it should also disable itself fairly smoothly By $wgMemc is used but when it is $parserMemc or $messageMemc this is mentioned below
Definition: memcached.txt:96
Makefile.download
def download(url, dest)
Definition: Makefile.py:40
$wgCapitalizeTitle
An extension or a will often add custom code to the function with or without a global variable For someone wanting email notification when an article is shown may $wgCapitalizeTitle
Definition: hooks.txt:51
$abortMsg
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 incomplete & $abortMsg
Definition: hooks.txt:237
memcached
MediaWiki has optional support for memcached
Definition: memcached.txt:1
Revision
Definition: Revision.php:26
MailAddress
Stores a single person's name and email address.
Definition: UserMailer.php:32
edits
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
Definition: deferred.txt:11
etc
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 etc
Definition: hooks.txt:93
title
to move a page</td >< td > &*You are moving the page across *A non empty talk page already exists under the new or *You uncheck the box below In those you will have to move or merge the page manually if desired</td >< td > be sure to &You are responsible for making sure that links continue to point where they are supposed to go Note that the page will &a page at the new title
Definition: All_system_messages.txt:2703
https
scripts txt MediaWiki primary scripts are in the root directory of the software Users should only use these scripts to access the wiki There are also some php that aren t primary scripts but helper files and won t work if they are accessed directly by the web Primary see https
Definition: scripts.txt:21
updates
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 updates(as a Java servelet could)
ApiCreateAccount
Unit to authenticate account registration attempts to the current wiki.
Definition: ApiCreateAccount.php:30
file
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 we can concentrate it all in an extension file
Definition: hooks.txt:93
framework
For QUnit framework
Definition: hooks.txt:2107
UserSetCookies
return false to override stock group removal can be modified modifiable UserSetCookies
Definition: hooks.txt:2838
Preferences
We're now using the HTMLForm object with some customisation to generate the Preferences form.
Definition: Preferences.php:48
try
try
Definition: api.php:72
example
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 example
Definition: deferred.txt:4
article
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add in any and then calling but I prefer the flexibility This should also do the output encoding The system allocates a global one in $wgOut Title Represents the title of an article
Definition: design.txt:25
$ldapServer
processing should stop and the error should be shown to the user if you wanted to authenticate users to a custom you could $ldapServer
Definition: hooks.txt:191
$res
see documentation in includes Linker php for Linker::makeImageLink or false for current & $res
Definition: hooks.txt:1358
ConvertContent
namespace and then decline to actually register it RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist but no entry for that model exists in $wgContentHandlers if desired whether it is OK to use $contentModel on $title Handler functions that modify $ok should generally return false to prevent further hooks from further modifying $ok ConvertContent
Definition: hooks.txt:815
File
Implements some public methods and some protected utility functions which are required by multiple ch...
Definition: File.php:50
based
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero based
Definition: hooks.txt:1956
namespaces
to move a page</td >< td > &*You are moving the page across namespaces
Definition: All_system_messages.txt:2677
MediaWiki
hooks txt This document describes how event hooks work in MediaWiki
Definition: hooks.txt:3
otherwise
otherwise
Definition: hooks.txt:2113
EditPageGetDiffText
in this case you re responsible for computing and outputting the entire conflict i the difference between revisions and your text headers and sections and Diff overridable Default is either copyrightwarning or copyrightwarning2 EditPageGetDiffText
Definition: hooks.txt:1038
$editPage
as a message key or array as accepted by ApiBase::dieUsageMsg after processing request parameters Return false to let the request returning an error message or an< edit result="Failure"> tag if $resultArr was filled $editPage
Definition: hooks.txt:375
$out
$out
Definition: UtfNormalGenerate.php:167
LoginPasswordResetMessage
div flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LoginAuthenticateAudit' this hook is for auditing only etc LoginPasswordResetMessage
Definition: hooks.txt:1632
SearchResult
Definition: SearchResult.php:30
$titles
linkcache txt The LinkCache class maintains a list of article titles and the information about whether or not the article exists in the database This is used to mark up links when displaying a page If the same link appears more than once on any page then it only has to be looked up once In most cases link lookups are done in batches with the LinkBatch class or the equivalent in so the link cache is mostly useful for short snippets of parsed and for links in the navigation areas of the skin The link cache was formerly used to track links used in a document for the purposes of updating the link tables This application is now deprecated To create a you can use the following $titles
Definition: linkcache.txt:17
ChangePassword
Maintenance script to change the password of a given user.
Definition: changePassword.php:34
$css
$css
Definition: styleTest.css.php:50
sql
SQLite shares the MySQL schema file at maintenance tables sql
Definition: sqlite.txt:1
hooks
Using a hook running we can avoid having all this option specific stuff in our mainline code Using hooks
Definition: hooks.txt:73
BitmapHandler
Generic handler for bitmap images.
Definition: Bitmap.php:29
table
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 table
Definition: deferred.txt:11
so
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 so(and don 't be surprised if I reformat your code). - I have the code indented with tabs to save file size and so that users can set their tab stops to any depth they like. I use 4-space tab stops
batch
linkcache txt The LinkCache class maintains a list of article titles and the information about whether or not the article exists in the database This is used to mark up links when displaying a page If the same link appears more than once on any page then it only has to be looked up once In most cases link lookups are done in batches with the LinkBatch class or the equivalent in so the link cache is mostly useful for short snippets of parsed and for links in the navigation areas of the skin The link cache was formerly used to track links used in a document for the purposes of updating the link tables This application is now deprecated To create a batch
Definition: linkcache.txt:14
$wgTitle
$wgTitle
Definition: globals.txt:20
ShowMissingArticle
set to $title object and return false for a match for latest after cache objects are set ShowMissingArticle
Definition: hooks.txt:2149
there
has been added to your &Future changes to this page and its associated Talk page will be listed there
Definition: All_system_messages.txt:357
$editor
in this case you re responsible for computing and outputting the entire conflict i the difference between revisions and your text headers and sections & $editor
Definition: hooks.txt:1038
$parser
do that in ParserLimitReportFormat instead $parser
Definition: hooks.txt:1956
ContextSource
The simplest way of implementing IContextSource is to hold a RequestContext as a member variable and ...
Definition: ContextSource.php:30
directly
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add in any and then calling but I prefer the flexibility This should also do the output encoding The system allocates a global one in $wgOut Title Represents the title of an and does all the work of translating among various forms such as plain database etc For and for historical it also represents a few features of articles that don t involve their such as access rights See also title txt Article Encapsulates access to the page table of the database The object represents a an and maintains state such as etc Revision Encapsulates individual page revision data and access to the revision text blobs storage system Higher level code should never touch text storage directly
Definition: design.txt:34
$pre
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 $pre
Definition: hooks.txt:1105
Profiler
Definition: Profiler.php:97
scripts
scripts txt MediaWiki primary scripts are in the root directory of the software Users should only use these scripts to access the wiki There are also some php that aren t primary scripts but helper files and won t work if they are accessed directly by the web Primary scripts
Definition: scripts.txt:21
UserArrayFromResult
Definition: UserArrayFromResult.php:23
$specialPageAliases
$specialPageAliases
Definition: MessagesAb.php:58
$parser
function wfGetCustomMagicWordValue $parser
Definition: magicword.txt:52
TitleArrayFromResult
Definition: TitleArrayFromResult.php:27
GetRelativeTimestamp
if the prop value should be in the metadata multi language array can modify can modify indexed by page_id indexed by prefixed DB keys can modify can modify can modify this should be populated with an alert message to that effect to be fed to an HTMLForm object GetRelativeTimestamp
Definition: hooks.txt:1230
$wgOut
$wgOut
Definition: Setup.php:562
MediaWiki
$siteNotice
set to $title object and return false for a match for latest after cache objects are set use the ContentHandler facility to handle CSS and JavaScript for highlighting or change the value of $siteNotice and return false to alter it & $siteNotice
Definition: hooks.txt:2149
wfMessage
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form externallinks including delete and has completed for all link tables default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "&lt
subdirectories
Prior to maintenance scripts were a hodgepodge of code that had no cohesion or formal method of action Beginning maintenance scripts have been cleaned up to use a unified class Directory structure How to run a script How to write your own DIRECTORY STRUCTURE The maintenance directory of a MediaWiki installation contains several subdirectories
Definition: maintenance.txt:1
UserGetEmailAuthenticationTimestamp
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output return false to not delete it return false to override the default password checks this Boolean value will be checked to determine if the password was valid return false to implement your own hashing method this String will be used as the hash which may be added to this hook is run right before returning the options to the caller which means it s potentially called dozens or hundreds of times You may want to cache the results of non trivial operations in your hook function for this reason change this to override email UserGetEmailAuthenticationTimestamp
Definition: hooks.txt:2697
text
linkcache txt The LinkCache class maintains a list of article titles and the information about whether or not the article exists in the database This is used to mark up links when displaying a page If the same link appears more than once on any page then it only has to be looked up once In most cases link lookups are done in batches with the LinkBatch class or the equivalent in so the link cache is mostly useful for short snippets of parsed text(such as the site notice)
name
and how to run hooks for an and one after Each event has a name
Definition: hooks.txt:6
pagelinks
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form pagelinks
Definition: hooks.txt:1530
Undelete
Definition: undelete.php:26
$oldTitle
versus $oldTitle
Definition: globals.txt:16
wfRunHooks
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
Definition: GlobalFunctions.php:4001
ContentModelCanBeUsedOn
namespace and then decline to actually register it RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist but no entry for that model exists in $wgContentHandlers if desired ContentModelCanBeUsedOn
Definition: hooks.txt:815
gzip
gzip
Definition: hooks.txt:2117
EmailUser
return true to allow those checks to and false if checking is done EmailUser
Definition: hooks.txt:1105
UsersPager
This class is used to get a list of user.
Definition: SpecialListusers.php:35
version
Prior to version
Definition: maintenance.txt:1
MWNamespace
This is a utility class with only static functions for dealing with namespaces that encodes all the "...
Definition: Namespace.php:33
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
add
An extension or a will often add custom code to the function with or without a global variable For someone wanting email notification when an article is shown may add
Definition: hooks.txt:51
output
as a message key or array as accepted by ApiBase::dieUsageMsg after processing request parameters Return false to let the request returning an error message or an< edit result="Failure"> tag if $resultArr was filled which will be used in the intoken parameter and in the output(actiontoken="...")
PreferencesForm
Some tweaks to allow js prefs to work.
Definition: Preferences.php:1508
MovePageForm
A special page that allows users to change page titles.
Definition: SpecialMovepage.php:29
query
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form externallinks including delete and has completed for all link tables default is conds Array Extra conditions for the query(e.g. "log_action != 'revision'") - showIfEmpty boolean Set to false if you don 't want any output in case the loglist is empty if set to true(default)
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
becomes
Using a hook running we can avoid having all this option specific stuff in our mainline code Using the function becomes
Definition: hooks.txt:73
SearchResultSet
Definition: SearchResultSet.php:27
form
null means default in associative array form
Definition: hooks.txt:1530
$comment
$comment
Definition: importImages.php:107
settings
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
Definition: globals.txt:25
RequestContext
Group all the pieces relevant to the context of a request into one instance.
Definition: RequestContext.php:30
MagicWord
This class encapsulates "magic words" such as "#redirect", NOTOC, etc.
Definition: MagicWord.php:61
$cookies
return false to override stock group removal can be modified modifiable will be added to $_SESSION & $cookies
Definition: hooks.txt:2838
LoginForm
Implements Special:UserLogin.
Definition: SpecialUserlogin.php:29
$magicWords
magicword txt Magic Words are some phrases used in the wikitext They are used for two that looks like templates but that don t accept any parameter *Parser functions(like {{fullurl:...}}, {{#special:...}}) $magicWords['en']
Definition: magicword.txt:33
UserArray
Definition: UserArray.php:23
simple
and how to run hooks for an and one after Each event has a preferably in CamelCase For ArticleDelete hook A clump of code and data that should be run when an event happens This can be either a function and a chunk of or an object and a method hook function The function part of a third party developers and administrators to define code that will be run at certain points in the mainline and to modify the data run by that mainline code Hooks can keep mainline code simple
Definition: hooks.txt:23
URL
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add in any and then calling but I prefer the flexibility This should also do the output encoding The system allocates a global one in $wgOut Title Represents the title of an and does all the work of translating among various forms such as plain URL
Definition: design.txt:25
OutputPage
This class should be covered by a general architecture document which does not exist as of January 20...
Definition: OutputPage.php:38
Wikipedia
MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like Wikipedia
Definition: memcached.txt:1
WikiExporter
Definition: Export.php:33
$allowUsertalk
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output return false to not delete it return false to override the default password checks this Boolean value will be checked to determine if the password was valid return false to implement your own hashing method this String will be used as the hash which may be added to this hook is run right before returning the options to the caller which means it s potentially called dozens or hundreds of times You may want to cache the results of non trivial operations in your hook function for this reason change this to override email change this to override email authentication timestamp whether or not the user is blocked from that page & $allowUsertalk
Definition: hooks.txt:2697
list
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 list
Definition: deferred.txt:11
LocalFile
Class to represent a local file in the wiki's own database.
Definition: LocalFile.php:46
cases
to move a page</td >< td > &*You are moving the page across *A non empty talk page already exists under the new or *You uncheck the box below In those cases
Definition: All_system_messages.txt:2677
false
processing should stop and the error should be shown to the user * false
Definition: hooks.txt:188
$colours
if the prop value should be in the metadata multi language array can modify can modify indexed by page_id & $colours
Definition: hooks.txt:1230
SpecialUpload
Form for handling uploads and special page.
Definition: SpecialUpload.php:31
GetCanonicalURL
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 GetCanonicalURL
Definition: hooks.txt:1105
database
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the database
Definition: design.txt:12
will
</td >< td > &</td >< td > t want your writing to be edited mercilessly and redistributed at will
Definition: All_system_messages.txt:914
errors
if the prop value should be in the metadata multi language array can modify can modify indexed by page_id indexed by prefixed DB keys can modify can modify can modify this should be populated with an alert message to that effect to be fed to an HTMLForm object and populate $result with the reason in the form of error messages should be plain text with no special etc to show that they re errors
Definition: hooks.txt:1318
SpecialWatchlist
A special page that lists last changes made to the wiki, limited to user-defined list of titles.
Definition: SpecialWatchlist.php:30
$options
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
Definition: hooks.txt:1530
$wgNotifyArticle
An extension or a will often add custom code to the function with or without a global variable For someone wanting email notification when an article is shown may $wgNotifyArticle
Definition: hooks.txt:51
PingLimiter
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values my talk my contributions etc etc PingLimiter
Definition: hooks.txt:1956
execute
$batch execute()
wfShellWikiCmd
wfShellWikiCmd( $script, array $parameters=array(), array $options=array())
Generate a shell-escaped command line string to run a MediaWiki cli script.
Definition: GlobalFunctions.php:3062
$section
$section
Definition: Utf8Test.php:88
$line
$line
Definition: cdb.php:57
imagelinks
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form imagelinks
Definition: hooks.txt:1530
program
I won t presume to tell you how to program
Definition: design.txt:70
root
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 so they can t rely on Unix and must forbid reads to even standard directories like tmp lest users read each others files We cannot assume that the user has the ability to install or run any programs not written as web accessible PHP scripts Since anything that works on cheap shared hosting will work if you have shell or root access MediaWiki s design is based around catering to the lowest common denominator Although we support higher end setups as the way many things work by default is tailored toward shared hosting These defaults are unconventional from the point of view of and they certainly aren t ideal for someone who s installing MediaWiki as root
Definition: distributors.txt:39
$sectionContent
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty & $sectionContent
Definition: hooks.txt:1956
$title
presenting them properly to the user as errors is done by the caller $title
Definition: hooks.txt:1324
function
when a variable name is used in a function
Definition: design.txt:93
GitViewers
presenting them properly to the user as errors is done by the caller return true GitViewers
Definition: hooks.txt:1337
MemCacheClient
controlled by $wgMainCacheType controlled by $wgParserCacheType controlled by $wgMessageCacheType If you set CACHE_NONE to one of the three control default value for MediaWiki still create a MemCacheClient
Definition: memcached.txt:78
see
Some information about database access in MediaWiki By Tim January Database layout For information about the MediaWiki database such as a description of the tables and their please see
Definition: database.txt:2
UserToolLinksEdit
return false to override stock group removal can be modified modifiable will be added to $_SESSION change this to override new email address change this to override email authentication timestamp UserToolLinksEdit
Definition: hooks.txt:2838
template
The package styleguide template
Definition: README.txt:1
user
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
Definition: distributors.txt:9
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:336
writer
An extension writer
Definition: hooks.txt:51
OldChangesList
Definition: OldChangesList.php:23
action
action
Definition: parserTests.txt:378
$size
$size
Definition: RandomTest.php:75
skin
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a skin(according to that user 's preference)
$value
$value
Definition: styleTest.css.php:45
occur
return true to allow those checks to occur
Definition: hooks.txt:1105
UserGetImplicitGroups
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output return false to not delete it return false to override the default password checks this Boolean value will be checked to determine if the password was valid return false to implement your own hashing method this String will be used as the hash which may be added to this hook is run right before returning the options to the caller which means it s potentially called dozens or hundreds of times You may want to cache the results of non trivial operations in your hook function for this reason change this to override email change this to override email authentication timestamp UserGetImplicitGroups
Definition: hooks.txt:2697
distributions
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 distributions
Definition: distributors.txt:3
XMPInfo
This class is just a container for a big array used by XMPReader to determine which XMP items to extr...
Definition: XMPInfo.php:29
wrongpassword
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values my talk my contributions etc etc otherwise the built in rate limiting checks are if enabled also a ContextSource wrongpassword
Definition: hooks.txt:1956
follows
the other converts the title to all uppercase letters in MediaWiki we would handle this as follows(note:not real code, here)
Definition: hooks.txt:35
$linksUpdate
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form externallinks $linksUpdate
Definition: hooks.txt:1530
too
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 so if you want to use a style that puts opening braces on the next that s OK too
Definition: design.txt:79
variable
controlled by $wgMainCacheType controlled by $wgParserCacheType controlled by $wgMessageCacheType If you set CACHE_NONE to one of the three control variable
Definition: memcached.txt:78
SpecialPage
Parent class for all special pages.
Definition: SpecialPage.php:33
set
it s the revision text itself In either if gzip is set
Definition: hooks.txt:2113
options
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
available
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 available
Definition: skin.txt:10
some
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
Definition: design.txt:79
$tools
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title after the basic globals have been set but before ordinary actions take place change it to the message you want to define which works for all SkinTemplate type skins $tools
Definition: hooks.txt:1679
mail
address of the mail
Definition: All_system_messages.txt:1386
UploadComplete
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 where the first element is the message key and the remaining elements are used as parameters to the message based on mime etc Preferred in most cases over UploadVerification object with all info about the upload string as detected by MediaWiki Handlers will typically only apply for specific mime types object an indexed array representing the problem with the where the first element is the message key and the remaining elements are used as parameters to the message UploadComplete
Definition: hooks.txt:2573
Modern
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 * Modern
Definition: skin.txt:10
transformed
</td >< td > this can then be imported into another wiki running MediaWiki transformed
Definition: All_system_messages.txt:1488
etc
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add etc
Definition: design.txt:12
$revert
div flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LoginAuthenticateAudit' this hook is for auditing only etc create2 Corresponds to logging log_action database field and which is displayed in the UI & $revert
Definition: hooks.txt:1632
PPFrame
Definition: Preprocessor.php:72
Live
in this case you re responsible for computing and outputting the entire conflict i the difference between revisions and your text headers and sections Live
Definition: hooks.txt:1038
cssjanus.main
def main(argv)
Definition: cssjanus.py:554
ResourceLoaderStartUpModule
Definition: ResourceLoaderStartUpModule.php:25
up
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title after the basic globals have been set up
Definition: hooks.txt:1679
https
This technique is used by the more ambitious MediaWiki site to create complex custom skins for their wikis It should be preferred over editing the core Monobook skin directly See https
Definition: skin.txt:75
conventions
be sure to use the *correct *language object depending upon the circumstances See also language txt Parser Class used to transform wikitext to html LinkCache Keeps information on existence of articles See linkcache txt Naming coding conventions
Definition: design.txt:69
SpecialSearch
implements Special:Search - Run text & title search and display the output
Definition: SpecialSearch.php:30
FetchChangesList
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone FetchChangesList
Definition: hooks.txt:1105
$handlerParams
see documentation in includes Linker php for Linker::makeImageLink & $handlerParams
Definition: hooks.txt:1356
UserIsEveryoneAllowed
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output return false to not delete it return false to override the default password checks this Boolean value will be checked to determine if the password was valid return false to implement your own hashing method this String will be used as the hash which may be added to this hook is run right before returning the options to the caller which means it s potentially called dozens or hundreds of times You may want to cache the results of non trivial operations in your hook function for this reason change this to override email change this to override email authentication timestamp whether or not the user is blocked from that page whether or not the block allows users to edit their own user talk pages to be modified by the hook UserIsEveryoneAllowed
Definition: hooks.txt:2697
SpecialVersion
Give information about the version of MediaWiki, PHP, the DB and extensions.
Definition: SpecialVersion.php:31
SpecialRecentChanges
A special page that lists last changes made to the wiki.
Definition: SpecialRecentchanges.php:29
LocalisationCache
Class for caching the contents of localisation files, Messages*.php and *.i18n.php.
Definition: LocalisationCache.php:37
following
Prior to maintenance scripts were a hodgepodge of code that had no cohesion or formal method of action Beginning maintenance scripts have been cleaned up to use a unified class Directory structure How to run a script How to write your own DIRECTORY STRUCTURE The maintenance directory of a MediaWiki installation contains several all of which have unique purposes HOW TO RUN A SCRIPT Ridiculously just call php someScript php that s in the top level maintenance directory if not default do this many per batch HOW TO WRITE YOUR OWN Make a file in the maintenance directory called myScript php or something In write the following
Definition: maintenance.txt:1
$wgHooks
$wgHooks['MagicWordwgVariableIDs'][]
Definition: magicword.txt:44
$upload
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 where the first element is the message key and the remaining elements are used as parameters to the message based on mime etc Preferred in most cases over UploadVerification object $upload
Definition: hooks.txt:2573
Nostalgia
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 * Nostalgia
Definition: skin.txt:10
block
div flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LoginAuthenticateAudit' this hook is for auditing only etc block
Definition: hooks.txt:1632
addition
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 addition
Definition: hooks.txt:86
off
Use of locking define a new flag for $wgAntiLockFlags which allows them to be turned off
Definition: database.txt:164
sysop
could not be made into a sysop(Did you enter the name correctly?) &lt
NamespaceIsMovable
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title after the basic globals have been set but before ordinary actions take place change it to the message you want to define which works for all SkinTemplate type skins see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array NamespaceIsMovable
Definition: hooks.txt:1679
globals
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 which are documented in DefaultSettings php There is no comprehensive documentation for the remaining globals
Definition: globals.txt:25
$mediaWiki
$mediaWiki
Definition: index.php:45
$user
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
Definition: hooks.txt:237
tags
pre inside other HTML tags(bug 54946) !! wikitext a< div >< pre > foo</pre ></div >< pre ></pre > !! html< p >a</p >< div >< pre > foo</pre ></div >< pre ></pre > !! end !! test HTML pre followed by indent-pre !! wikitext< pre >foo</pre > bar !! html< pre >foo</pre >< pre >bar</pre > !! end !!test Block tag pre !!options parsoid !! wikitext< p >< pre >foo</pre ></p > !! html< p data-parsoid
NewPagesPager
Definition: SpecialNewpages.php:500
UserGetDefaultOptions
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output return false to not delete it return false to override the default password checks this Boolean value will be checked to determine if the password was valid return false to implement your own hashing method this String will be used as the hash which may be added to UserGetDefaultOptions
Definition: hooks.txt:2697
SearchEngine
Contain a class for special pages.
Definition: SearchEngine.php:32
scripts
The package scripts
Definition: README.txt:1
only
published in in Madrid In the first edition of the Vocabolario for was published In in Rotterdam was the Dictionnaire Universel ! html< p > The first monolingual dictionary written in a Romance language was< i > Sebastián Covarrubias</i >< i > Tesoro de la lengua castellana o published in in Madrid In the first edition of the< i > Vocabolario dell< a href="/index.php?title=Accademia_della_Crusca&amp;action=edit&amp;redlink=1" class="new" title="Accademia della Crusca (page does not exist)"> Accademia della Crusca</a ></i > for was published In in Rotterdam was the< i > Dictionnaire Universel</i ></p > ! end ! test Italics and ! wikitext foo ! html< p >< i > foo</i ></p > !end ! test Italics and ! wikitext foo ! html< p >< i > foo</i ></p > !end ! test Italics and ! wikitext foo ! html< p >< i > foo</i ></p > !end ! test Italics and ! wikitext foo ! html php< p >< i > foo</i ></p > ! html parsoid< p >< i > foo</i >< b ></b ></p > !end ! test Italics and ! wikitext foo ! html< p >< i > foo</i ></p > !end ! test Italics and ! wikitext foo ! html< p >< b > foo</b ></p > !end ! test Italics and ! wikitext foo ! html< p >< b > foo</b ></p > !end ! test Italics and ! wikitext foo ! html php< p >< b > foo</b ></p > ! html parsoid< p >< b > foo</b >< i ></i ></p > !end ! test Italics and ! wikitext foo ! html< p >< i > foo</i ></p > !end ! test Italics and ! wikitext foo ! html< p >< b > foo</b ></p > !end ! test Italics and ! wikitext foo ! html< p >< b > foo</b ></p > !end ! test Italics and ! wikitext foo ! html php< p >< b > foo</b ></p > ! html parsoid< p >< b > foo</b >< i ></i ></p > !end ! test Italics and ! options ! wikitext foo ! html< p >< b >< i > foo</i ></b ></p > !end ! test Italics and ! wikitext foo ! html< p >< i >< b > foo</b ></i ></p > !end ! test Italics and ! wikitext foo ! html< p >< i >< b > foo</b ></i ></p > !end ! test Italics and ! wikitext foo ! html< p >< i >< b > foo</b ></i ></p > !end ! test Italics and ! wikitext foo bar ! html< p >< i > foo< b > bar</b ></i ></p > !end ! test Italics and ! wikitext foo bar ! html< p >< i > foo< b > bar</b ></i ></p > !end ! test Italics and ! wikitext foo bar ! html< p >< i > foo< b > bar</b ></i ></p > !end ! test Italics and ! wikitext foo bar ! html php< p >< b > foo</b > bar</p > ! html parsoid< p >< b > foo</b > bar< i ></i ></p > !end ! test Italics and ! wikitext foo bar ! html php< p >< b > foo</b > bar</p > ! html parsoid< p >< b > foo</b > bar< b ></b ></p > !end ! test Italics and ! wikitext this is about foo s family ! html< p >< i > this is about< b > foo s family</b ></i ></p > !end ! test Italics and ! wikitext this is about foo s family ! html< p >< i > this is about< b > foo s</b > family</i ></p > !end ! test Italics and ! wikitext this is about foo s family ! html< p >< b > this is about< i > foo</i ></b >< i > s family</i ></p > !end ! test Italics and ! options ! wikitext this is about foo s family ! html< p >< i > this is about</i > foo< b > s family</b ></p > !end ! test Italics and ! wikitext this is about foo s family ! html< p >< b > this is about< i > foo s</i > family</b ></p > !end ! test Italicized possessive ! wikitext The s talk page ! html< p > The< i >< a href="/wiki/Main_Page" title="Main Page"> Main Page</a ></i > s talk page</p > ! end ! test Parsoid only
Definition: parserTests.txt:396
begin
$dbw begin(__METHOD__)
Title\getFullURL
getFullURL( $query='', $query2=false, $proto=PROTO_RELATIVE)
Get a real URL referring to this title, with interwiki link and fragment.
Definition: Title.php:1598
IContextSource
Interface for objects which can provide a context on request.
Definition: IContextSource.php:29
WebRequest
The WebRequest class encapsulates getting at data passed in the URL or via a POSTed form,...
Definition: WebRequest.php:38
Alternatively
namespace and then decline to actually register it RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist but no entry for that model exists in $wgContentHandlers if desired whether it is OK to use $contentModel on $title Handler functions that modify $ok should generally return false to prevent further hooks from further modifying $ok in case the handler function wants to provide a converted Content object Note that $result getContentModel() must return $toModel. Handler functions that modify $result should generally return false to further attempts at conversion. 'ContribsPager you ll need to handle error etc yourself Alternatively
Definition: hooks.txt:896
$hash
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output return false to not delete it return false to override the default password checks & $hash
Definition: hooks.txt:2697
Special
wiki Special
Definition: All_system_messages.txt:2674
start
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 start
Definition: skin.txt:62
$password
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output return false to not delete it return false to override the default password checks this Boolean value will be checked to determine if the password was valid return false to implement your own hashing method & $password
Definition: hooks.txt:2697
$summary
$summary
Definition: importImages.php:120
Content
Base interface for content objects.
Definition: Content.php:34
SkinVector
SkinTemplate class for Vector skin.
Definition: Vector.php:34
QuickTemplate
Generic wrapper for template functions, with interface compatible with what we use of PHPTAL 0....
Definition: SkinTemplate.php:1372
$file
if(PHP_SAPI !='cli') $file
Definition: UtfNormalTest2.php:30
FormatMetadata
Format Image metadata values into a human readable form.
Definition: FormatMetadata.php:49
indexed
which are not indexed
Definition: All_system_messages.txt:3011
core
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values my talk my contributions etc etc otherwise the built in rate limiting checks are if enabled also a ContextSource error or success such as when responding to a resource loader request or generating HTML output included in core
Definition: hooks.txt:1956
$skin
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned $skin
Definition: hooks.txt:1530
$wgArticlePath
$wgArticlePath
Definition: img_auth.php:48
MediaWiki\performRequest
performRequest()
Performs the request.
Definition: Wiki.php:168
$rev
presenting them properly to the user as errors is done by the caller return true use this to change the list i e etc $rev
Definition: hooks.txt:1337
it
=Architecture==Two class hierarchies are used to provide the functionality associated with the different content models:*Content interface(and AbstractContent base class) define functionality that acts on the concrete content of a page, and *ContentHandler base class provides functionality specific to a content model, but not acting on concrete content. The most important function of ContentHandler is to act as a factory for the appropriate implementation of Content. These Content objects are to be used by MediaWiki everywhere, instead of passing page content around as text. All manipulation and analysis of page content must be done via the appropriate methods of the Content object. For each content model, a subclass of ContentHandler has to be registered with $wgContentHandlers. The ContentHandler object for a given content model can be obtained using ContentHandler::getForModelID($id). Also Title, WikiPage and Revision now have getContentHandler() methods for convenience. ContentHandler objects are singletons that provide functionality specific to the content type, but not directly acting on the content of some page. ContentHandler::makeEmptyContent() and ContentHandler::unserializeContent() can be used to create a Content object of the appropriate type. However, it is recommended to instead use WikiPage::getContent() resp. Revision::getContent() to get a page 's content as a Content object. These two methods should be the ONLY way in which page content is accessed. Another important function of ContentHandler objects is to define custom action handlers for a content model, see ContentHandler::getActionOverrides(). This is similar to what WikiPage::getActionOverrides() was already doing.==Serialization==With the ContentHandler facility, page content no longer has to be text based. Objects implementing the Content interface are used to represent and handle the content internally. For storage and data exchange, each content model supports at least one serialization format via ContentHandler::serializeContent($content). The list of supported formats for a given content model can be accessed using ContentHandler::getSupportedFormats(). Content serialization formats are identified using MIME type like strings. The following formats are built in:*text/x-wiki - wikitext *text/javascript - for js pages *text/css - for css pages *text/plain - for future use, e.g. with plain text messages. *text/html - for future use, e.g. with plain html messages. *application/vnd.php.serialized - for future use with the api and for extensions *application/json - for future use with the api, and for use by extensions *application/xml - for future use with the api, and for use by extensions In PHP, use the corresponding CONTENT_FORMAT_XXX constant. Note that when using the API to access page content, especially action=edit, action=parse and action=query &prop=revisions, the model and format of the content should always be handled explicitly. Without that information, interpretation of the provided content is not reliable. The same applies to XML dumps generated via maintenance/dumpBackup.php or Special:Export. Also note that the API will provide encapsulated, serialized content - so if the API was called with format=json, and contentformat is also json(or rather, application/json), the page content is represented as a string containing an escaped json structure. Extensions that use JSON to serialize some types of page content may provide specialized API modules that allow access to that content in a more natural form.==Compatibility==The ContentHandler facility is introduced in a way that should allow all existing code to keep functioning at least for pages that contain wikitext or other text based content. However, a number of functions and hooks have been deprecated in favor of new versions that are aware of the page 's content model, and will now generate warnings when used. Most importantly, the following functions have been deprecated:*Revisions::getText() and Revisions::getRawText() is deprecated in favor Revisions::getContent() *WikiPage::getText() is deprecated in favor WikiPage::getContent() Also, the old Article::getContent()(which returns text) is superceded by Article::getContentObject(). However, both methods should be avoided since they do not provide clean access to the page 's actual content. For instance, they may return a system message for non-existing pages. Use WikiPage::getContent() instead. Code that relies on a textual representation of the page content should eventually be rewritten. However, ContentHandler::getContentText() provides a stop-gap that can be used to get text for a page. Its behavior is controlled by $wgContentHandlerTextFallback it
Definition: contenthandler.txt:107
broken
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped broken
Definition: hooks.txt:1530
MediaTransformOutput
Base class for the output of MediaHandler::doTransform() and File::transform().
Definition: MediaTransformOutput.php:29
$args
if( $line===false) $args
Definition: cdb.php:62
$extTypes
return true to allow those checks to and false if checking is done use this to change the tables headers & $extTypes
Definition: hooks.txt:1105
RawPage
Backward compatibility for extensions.
Definition: RawAction.php:261
Title
Represents a title within MediaWiki.
Definition: Title.php:35
flags
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add in any and then calling but I prefer the flexibility This should also do the output encoding The system allocates a global one in $wgOut Title Represents the title of an and does all the work of translating among various forms such as plain database etc For and for historical it also represents a few features of articles that don t involve their such as access rights See also title txt Article Encapsulates access to the page table of the database The object represents a an and maintains state such as flags
Definition: design.txt:34
UserClearNewTalkNotification
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output UserClearNewTalkNotification
Definition: hooks.txt:2697
$namespaces
namespace and then decline to actually register it & $namespaces
Definition: hooks.txt:815
$wgLang
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as $wgLang
Definition: design.txt:56
ResourceLoader
Dynamic JavaScript and CSS resource loading system.
Definition: ResourceLoader.php:31
wfRandom
wfRandom()
Get a random decimal value between 0 and 1, in a way not likely to give duplicate values for any real...
Definition: GlobalFunctions.php:281
writing
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 writing
Definition: globals.txt:25
like
For a write use something like
Definition: database.txt:26
BitmapHandler\normaliseParams
normaliseParams( $image, &$params)
Definition: Bitmap.php:37
$cache
$cache
Definition: mcc.php:32
bolding
if the prop value should be in the metadata multi language array can modify can modify indexed by page_id indexed by prefixed DB keys can modify can modify can modify this should be populated with an alert message to that effect to be fed to an HTMLForm object and populate $result with the reason in the form of error messages should be plain text with no special bolding
Definition: hooks.txt:1318
Cookie
Definition: Cookie.php:24
$term
the value to return A Title object or null whereas SearchGetNearMatch runs after $term
Definition: hooks.txt:2125
$messageMemc
controlled by $wgMainCacheType controlled by $wgParserCacheType * $messageMemc
Definition: memcached.txt:78
in
Prior to maintenance scripts were a hodgepodge of code that had no cohesion or formal method of action Beginning in
Definition: maintenance.txt:1
on
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 on
Definition: hooks.txt:86
are
The ContentHandler facility adds support for arbitrary content types on wiki instead of relying on wikitext for everything It was introduced in MediaWiki Each kind of and so on Built in content types are
Definition: contenthandler.txt:5
WantedPagesPage
A special page that lists most linked pages that does not exist.
Definition: SpecialWantedpages.php:29
entirely
globals will be eliminated from MediaWiki entirely
Definition: globals.txt:25
https
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at https
Definition: design.txt:12
things
magicword txt Magic Words are some phrases used in the wikitext They are used for two things
Definition: magicword.txt:4
$wgExtensionMessagesFiles
$wgExtensionMessagesFiles['ExtensionNameMagic']
Definition: magicword.txt:43
FileDeleteComplete
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 FileDeleteComplete
Definition: hooks.txt:1105
then
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 then
Definition: skin.txt:10
used
you don t have to do a grep find to see where the $wgReverseTitle variable is used
Definition: hooks.txt:117
SpecialResetTokens
Let users reset tokens like the watchlist token.
Definition: SpecialResetTokens.php:29
$output
& $output
Definition: hooks.txt:375
SearchGetNearMatchBefore
external SearchGetNearMatchBefore
Definition: hooks.txt:2122
$path
$path
Definition: NoLocalSettings.php:35
XmlDumpWriter
Definition: Export.php:476
$wgMainCacheType
CACHE_MEMCACHED $wgMainCacheType
Definition: memcached.txt:63
TitleArray
The TitleArray class only exists to provide the newFromResult method at pre- sent.
Definition: TitleArray.php:31
format
if the prop value should be in the metadata multi language array format
Definition: hooks.txt:1230
as
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
Definition: distributors.txt:9
such
it sets a lot of them automatically from query and such
Definition: design.txt:93
Block
Definition: Block.php:22
however
</span ></p > ! end ! test Comments and Indent Pre ! wikitext<!-- comment 1 --> asdf<!-- comment 1 --> asdf<!-- comment 2 --><!-- comment 1 --> asdf<!-- comment 2 --> xyz<!-- comment 1 --> asdf<!-- comment 2 --> xyz ! html< pre > asdf</pre >< pre > asdf</pre >< pre > asdf</pre >< p > xyz</p >< pre > asdf xyz</pre > ! end ! test Comment test ! wikitext asdf<!-- comment 1 --> jkl ! html< p > asdf jkl</p > ! end ! test Comment test ! wikitext asdf<!-- comment 1 --> jkl ! html< p > asdf</p >< p > jkl</p > ! end ! test Comment test ! wikitext asdf<!-- comment 1 --><!-- comment 2 --> jkl ! html< p > asdf jkl</p > ! end ! test Comment test ! wikitext asdf<!-- comment 1 --> jkl ! html< p > asdfjkl</p > ! end ! test Comment spacing ! wikitext a<!-- foo --> b<!-- bar --> c ! html< p > a</p >< pre > b</pre >< p > c</p > ! end ! test Comment whitespace ! wikitext<!-- returns a single newline, not nothing, since the newline after > is not stripped ! html ! end ! test Comment semantics and delimiters ! wikitext<!-- --><!----><!-----><!------> ! html ! end ! test Comment semantics and redux ! wikitext<!-- In SGML every "foo" here would actually show up in the text -- foo -- bar-- foo -- funky huh? ... --> ! html ! end ! test Comment semantics and that wouldn t be valid XML however
Definition: parserTests.txt:1131
DifferenceEngine
Definition: DifferenceEngine.php:36
connection
you have access to all of the normal MediaWiki so you can get a DB connection
Definition: maintenance.txt:52
$incrBy
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values my talk my contributions etc etc otherwise the built in rate limiting checks are if enabled $incrBy
Definition: hooks.txt:1956
though
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 though
Definition: globals.txt:25
efficient
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an efficient
Definition: globals.txt:25
source
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 source
Definition: hooks.txt:1227
MessageBlobStore
This class provides access to the resource message blobs storage used by the ResourceLoader.
Definition: MessageBlobStore.php:34
Linker\makeImageLink
static makeImageLink($parser, Title $title, $file, $frameParams=array(), $handlerParams=array(), $time=false, $query="", $widthOption=null)
Given parameters derived from [[Image:Foo|options...]], generate the HTML that that syntax inserts in...
Definition: Linker.php:539
ParserLimitReportPrepare
namespace are movable Hooks may change this value to override the return value of MWNamespace::isMovable(). 'NewRevisionFromEditComplete' if it s text intended for display in a monospaced font $report should be output in English ParserLimitReportPrepare
Definition: hooks.txt:1746
$batch
$batch
Definition: linkcache.txt:23
Warning
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output return false to not delete it return false to override the default password checks this Boolean value will be checked to determine if the password was valid return false to implement your own hashing method this String will be used as the hash which may be added to this hook is run right before returning the options to the caller Warning
Definition: hooks.txt:2697
ManualLogEntry
Class for creating log entries manually, for example to inject them into the database.
Definition: LogEntry.php:339
$wgNamespaceProtection
if(!isset( $wgVersion)) if( $wgScript===false) if( $wgLoadScript===false) if( $wgArticlePath===false) if(!empty( $wgActionPaths) &&!isset( $wgActionPaths['view'])) if( $wgStylePath===false) if( $wgLocalStylePath===false) if( $wgStyleDirectory===false) if( $wgExtensionAssetsPath===false) if( $wgLogo===false) if( $wgUploadPath===false) if( $wgUploadDirectory===false) if( $wgReadOnlyFile===false) if( $wgFileCacheDirectory===false) if( $wgDeletedDirectory===false) if(isset( $wgFileStore['deleted']['directory'])) if(isset( $wgFooterIcons['copyright']) &&isset( $wgFooterIcons['copyright']['copyright']) && $wgFooterIcons['copyright']['copyright']===array()) if(isset( $wgFooterIcons['poweredby']) &&isset( $wgFooterIcons['poweredby']['mediawiki']) && $wgFooterIcons['poweredby']['mediawiki']['src']===null) $wgNamespaceProtection[NS_MEDIAWIKI]
Unconditional protection for NS_MEDIAWIKI since otherwise it's too easy for a sysadmin to set $wgName...
Definition: Setup.php:135
editing
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 editing
Definition: skin.txt:10
coloring
if the prop value should be in the metadata multi language array can modify can modify indexed by page_id indexed by prefixed DB keys can modify can modify can modify this should be populated with an alert message to that effect to be fed to an HTMLForm object and populate $result with the reason in the form of error messages should be plain text with no special coloring
Definition: hooks.txt:1318
preference
</pre > ! end ! test< nowiki > and< pre > preference(first one wins) !! wikitext< pre >< nowiki ></pre ></nowiki ></pre >< nowiki >< pre >< nowiki ></pre ></nowiki ></pre > !! html< pre > &lt
values
This code would result in ircNotify being run twice when an article is and once for brion Hooks can return three possible values
Definition: hooks.txt:177
ChangesList
Definition: ChangesList.php:25
$inject_html
occurs before session is loaded can be modified etc $inject_html
Definition: hooks.txt:2818
storage
For QUnit the mediawiki tests qunit testrunner dependency will be added to any module it s the URL of the revision text in external storage
Definition: hooks.txt:2107
WikiFilePage
Special handling for file pages.
Definition: WikiFilePage.php:28
ReverseChronologicalPager
IndexPager with a formatted navigation bar.
Definition: Pager.php:829
simple
Prior to maintenance scripts were a hodgepodge of code that had no cohesion or formal method of action Beginning maintenance scripts have been cleaned up to use a unified class Directory structure How to run a script How to write your own DIRECTORY STRUCTURE The maintenance directory of a MediaWiki installation contains several all of which have unique purposes HOW TO RUN A SCRIPT Ridiculously simple
Definition: maintenance.txt:1
from
Please log in again after you receive it</td >< td > s a saved copy from
Definition: All_system_messages.txt:3297
event
how to add hooks for an event
Definition: hooks.txt:4
that
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 that
Definition: deferred.txt:11
class
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
Definition: maintenance.txt:52
FormOptions
Helper class to keep track of options when mixing links and form elements.
Definition: FormOptions.php:35
$t
$t
Definition: testCompression.php:65
see
MediaWiki has optional support for a high distributed memory object caching system For general information on see
Definition: memcached.txt:1
Article
Class for viewing MediaWiki article and history.
Definition: Article.php:36
SearchGetNearMatch
set to $title object and return false for a match SearchGetNearMatch
Definition: hooks.txt:2133
term
which are not or by specifying more than one search term(only pages containing all of the search terms will appear in the result).</td >< td >
Definition: All_system_messages.txt:3012
EmailNotification
This module processes the email notifications when the current page is changed.
Definition: UserMailer.php:475
Makefile
The Makefile
Definition: README.txt:1
ContribsPager\getQueryInfo
getQueryInfo()
This function should be overridden to provide all parameters needed for the main paged query.
Definition: SpecialContributions.php:773
$vars
static configuration should be added through ResourceLoaderGetConfigVars instead & $vars
Definition: hooks.txt:1679
getUserPermissionsErrorsExpensive
presenting them properly to the user as errors is done by the caller return true getUserPermissionsErrorsExpensive
Definition: hooks.txt:1324
change
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 change
Definition: distributors.txt:9
code
and how to run hooks for an and one after Each event has a preferably in CamelCase For ArticleDelete hook A clump of code and data that should be run when an event happens This can be either a function and a chunk of or an object and a method hook function The function part of a third party developers and administrators to define code that will be run at certain points in the mainline code
Definition: hooks.txt:23
Skin
The main skin class which provides methods and properties for all other skins.
Definition: Skin.php:35
$error
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 where the first element is the message key and the remaining elements are used as parameters to the message based on mime etc Preferred in most cases over UploadVerification object with all info about the upload string as detected by MediaWiki Handlers will typically only apply for specific mime types object & $error
Definition: hooks.txt:2573
seen
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 seen
Definition: globals.txt:25
Consider
and how to run hooks for an and one after Each event has a preferably in CamelCase For ArticleDelete hook A clump of code and data that should be run when an event happens This can be either a function and a chunk of or an object and a method hook function The function part of a third party developers and administrators to define code that will be run at certain points in the mainline and to modify the data run by that mainline code Hooks can keep mainline code and make it easier to write extensions Hooks are a principled alternative to patches Consider
Definition: hooks.txt:23
$e
if( $useReadline) $e
Definition: eval.php:66
UserIsBlockedGlobally
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output return false to not delete it return false to override the default password checks this Boolean value will be checked to determine if the password was valid return false to implement your own hashing method this String will be used as the hash which may be added to this hook is run right before returning the options to the caller which means it s potentially called dozens or hundreds of times You may want to cache the results of non trivial operations in your hook function for this reason change this to override email change this to override email authentication timestamp whether or not the user is blocked from that page whether or not the block allows users to edit their own user talk pages UserIsBlockedGlobally
Definition: hooks.txt:2697
complete
Returning false makes less sense for events where the action is complete
Definition: hooks.txt:198
$query
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
Definition: hooks.txt:1105
SearchableNamespaces
set to $title object and return false for a match for latest SearchableNamespaces
Definition: hooks.txt:2149
WebResponse
Allow programs to request this object from WebRequest::response() and handle all outputting (or lack ...
Definition: WebResponse.php:28
$oldArticle
$oldArticle
Definition: globals.txt:17
ParserTestTables
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values ParserTestTables
Definition: hooks.txt:1956
select
We use the convention $dbr for read and $dbw for write to help you keep track of whether the database object is a the world will explode Or to be a subsequent write query which succeeded on the master may fail when replicated to the slave due to a unique key collision Replication on the slave will stop and it may take hours to repair the database and get it back online Setting read_only in my cnf on the slave will avoid this but given the dire we prefer to have as many checks as possible We provide a but the wrapper functions like select() and insert() are usually more convenient. They take care of things like table prefixes and escaping for you. If you really need to make your own SQL
UserCanSendEmail
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code UserCanSendEmail
Definition: hooks.txt:2697
order
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add in any order
Definition: design.txt:12
MessageCache
Message cache Performs various MediaWiki namespace-related functions.
Definition: MessageCache.php:52
$attribs
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing & $attribs
Definition: hooks.txt:1530
User
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition: User.php:59
message
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form externallinks including delete and has completed for all link tables default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a message
Definition: hooks.txt:1624
$article
Using a hook running we can avoid having all this option specific stuff in our mainline code Using the function array $article
Definition: hooks.txt:78
ImageGallery
Backwards compatibility.
Definition: TraditionalImageGallery.php:333
PathRouter
PathRouter class.
Definition: PathRouter.php:73
server
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 so they can t rely on Unix and must forbid reads to even standard directories like tmp lest users read each others files We cannot assume that the user has the ability to install or run any programs not written as web accessible PHP scripts Since anything that works on cheap shared hosting will work if you have shell or root access MediaWiki s design is based around catering to the lowest common denominator Although we support higher end setups as the way many things work by default is tailored toward shared hosting These defaults are unconventional from the point of view of and they certainly aren t ideal for someone who s installing MediaWiki as MediaWiki does not conform to normal Unix filesystem layout Hopefully we ll offer direct support for standard layouts in the but for now *any change to the location of files is unsupported *Moving things and leaving symlinks will *probably *not break but it is *strongly *advised not to try any more intrusive changes to get MediaWiki to conform more closely to your filesystem hierarchy Any such attempt will almost certainly result in unnecessary bugs The standard recommended location to install relative to the web is it should be possible to enable the appropriate rewrite rules by if you can reconfigure the web server
Definition: distributors.txt:53
wfResetSessionID
wfResetSessionID()
Reset the session_id.
Definition: GlobalFunctions.php:3502
Monobook
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook * Monobook
Definition: skin.txt:10
were
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 were
Definition: skin.txt:10
SearchAfterNoDirectMatch
the value to return A Title object or null SearchAfterNoDirectMatch
Definition: hooks.txt:2125
MWTimestamp\getHumanTimestamp
getHumanTimestamp(MWTimestamp $relativeTo=null, User $user=null, Language $lang=null)
Get the timestamp in a human-friendly relative format, e.g., "3 days ago".
Definition: MWTimestamp.php:178
$retval
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 incomplete not yet checked for validity & $retval
Definition: hooks.txt:237
request
div flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LoginAuthenticateAudit' this hook is for auditing only etc create2 Corresponds to logging log_action database field and which is displayed in the UI similar to $comment this hook should only be used to add variables that depend on the current page request
Definition: hooks.txt:1632
href
shown</td >< td > a href
Definition: All_system_messages.txt:2674
headers
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add headers
Definition: design.txt:12
section
section
Definition: parserTests.txt:378
BaseTemplate
New base template for a skin's template extended from QuickTemplate this class features helper method...
Definition: SkinTemplate.php:1512
redirect
This list may contain false positives That usually means there is additional text with links below the first Each row contains links to the first and second redirect
Definition: All_system_messages.txt:1267
lt
div & lt
Definition: hooks.txt:1631
SkinTemplate
Template-filler skin base class Formerly generic PHPTal (http://phptal.sourceforge....
Definition: SkinTemplate.php:70
addresses
storage can be distributed across multiple and multiple web servers can use the same cache cluster *********************W A R N I N G ***********************Memcached has no security or authentication Please ensure that your server is appropriately and that the anyone on the internet can put data into and read data from your cache An attacker familiar with MediaWiki internals could use this to steal passwords and email addresses
Definition: memcached.txt:43
Language
Internationalisation code.
Definition: Language.php:74
$special
namespace and then decline to actually register it RecentChangesLinked and Watchlist $special
Definition: hooks.txt:815
RevisionInsertComplete
For QUnit the mediawiki tests qunit testrunner dependency will be added to any module RevisionInsertComplete
Definition: hooks.txt:2107
MediaHandler
Base media handler class.
Definition: MediaHandler.php:29
Hooks
Hooks class.
Definition: Hooks.php:39
admin
An extension or a admin
Definition: hooks.txt:51
ResultWrapper
Result wrapper for grabbing data queried by someone else.
Definition: DatabaseUtility.php:99
line
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 so if you want to use a style that puts opening braces on the next line
Definition: design.txt:79
Html
This class is a collection of static functions that serve two purposes:
Definition: Html.php:50
$changed
$changed
Definition: UtfNormalGenerate.php:130
Diff
Class representing a 'diff' between two sequences of strings.
Definition: DairikiDiff.php:705
page
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values my talk page
Definition: hooks.txt:1956
HTMLForm
Object handling generic submission, CSRF protection, layout and other logic for UI forms.
Definition: HTMLForm.php:100
$type
$type
Definition: testCompression.php:46