From 63601400e476c6cf43d985f3e7b9864681695ed4 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 18 Jan 2013 16:46:04 +0100 Subject: Update to MediaWiki 1.20.2 this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024 --- docs/code-coverage/README | 2 +- docs/database.txt | 6 +- docs/distributors.txt | 7 +- docs/doxygen_first_page.php | 2 +- docs/export-0.1.xsd | 36 +-- docs/export-0.2.xsd | 48 ++-- docs/export-0.3.xsd | 68 +++--- docs/export-0.4.xsd | 76 +++---- docs/export-0.5.xsd | 78 +++---- docs/export-0.6.xsd | 84 +++---- docs/export-0.7.xsd | 272 +++++++++++++++++++++++ docs/export-demo.xml | 269 +++++++++++----------- docs/hooks.txt | 153 +++++++++++-- docs/language.txt | 20 +- docs/magicword.txt | 4 +- docs/memcached.txt | 2 +- docs/uidesign/mediawiki.action.history.diff.html | 12 +- 17 files changed, 765 insertions(+), 374 deletions(-) create mode 100644 docs/export-0.7.xsd (limited to 'docs') diff --git a/docs/code-coverage/README b/docs/code-coverage/README index 7bc55ce2..76ce9bdc 100644 --- a/docs/code-coverage/README +++ b/docs/code-coverage/README @@ -1,2 +1,2 @@ This directory is for the auto-generated phpunit code coverage. -Run 'make coverage' in the maintenance/tests/phpunit subdirectory to build. +Run 'make coverage' in the tests/phpunit subdirectory to build. diff --git a/docs/database.txt b/docs/database.txt index 3985b70e..c0a2412c 100644 --- a/docs/database.txt +++ b/docs/database.txt @@ -8,7 +8,7 @@ By Tim Starling, January 2006. For information about the MediaWiki database layout, such as a description of the tables and their contents, please see: http://www.mediawiki.org/wiki/Manual:Database_layout - http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance/tables.sql?view=markup + https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob_plain;f=maintenance/tables.sql;hb=HEAD ------------------------------------------------------------------------ @@ -153,9 +153,9 @@ enclose small groups of queries in their own transaction. Use the following syntax: $dbw = wfGetDB( DB_MASTER ); -$dbw->begin(); +$dbw->begin( __METHOD__ ); /* Do queries */ -$dbw->commit(); +$dbw->commit( __METHOD__ ); Use of locking reads (e.g. the FOR UPDATE clause) is not advised. They are poorly implemented in InnoDB and will cause regular deadlock errors. diff --git a/docs/distributors.txt b/docs/distributors.txt index e9f151cf..4a654315 100644 --- a/docs/distributors.txt +++ b/docs/distributors.txt @@ -87,9 +87,9 @@ which the user can edit by hand thereafter. It's just a plain old PHP file, and can contain any PHP statements. It usually sets global variables that are used for configuration, and includes files used by any extensions. -Distributors cannot easily add extra statements to the autogenerated -LocalSettings.php at the present time -- although hacking mw-config/index.php -would work. It would be nice if this situation could be improved. +Distributors can easily add extra statements to the autogenerated +LocalSettings.php by changing mw-config/overrides.php (see that file for details +and examples). There's a new maintenance/install.php script which could be used for performing an install through the command line. @@ -106,6 +106,7 @@ intelligently: mail(). == Updates == + The correct way for updating a wiki is to update the files and then run from command line the maintenance/update.php script (with appropriate parameters if files were moved). It will perform all the needed steps to update the database diff --git a/docs/doxygen_first_page.php b/docs/doxygen_first_page.php index 11db1f58..9949d133 100644 --- a/docs/doxygen_first_page.php +++ b/docs/doxygen_first_page.php @@ -13,7 +13,7 @@ die("Not a valid entry point\n"); * Welcome on MediaWiki autogenerated documentation system. * * If you are looking to use, install or configure your wiki, you probably - * want to look at the main site: http://www.mediawiki.org/ + * want to look at the main site: https://www.mediawiki.org/ * * @note this page is generated from docs/doxygen_first_page.php */ diff --git a/docs/export-0.1.xsd b/docs/export-0.1.xsd index 0b3eb179..9ff48f03 100644 --- a/docs/export-0.1.xsd +++ b/docs/export-0.1.xsd @@ -2,57 +2,57 @@ + xmlns:mw="http://www.mediawiki.org/xml/export-0.1/" + targetNamespace="http://www.mediawiki.org/xml/export-0.1/" + elementFormDefault="qualified"> MediaWiki's page export format - + - + schemaLocation="http://www.w3.org/2001/xml.xsd"/> + - + + minOccurs="0" maxOccurs="unbounded"/> - + - + - + - + + minOccurs="0" maxOccurs="unbounded"/> - + @@ -63,12 +63,12 @@ - + - + diff --git a/docs/export-0.2.xsd b/docs/export-0.2.xsd index 8acbf543..55b05f8d 100644 --- a/docs/export-0.2.xsd +++ b/docs/export-0.2.xsd @@ -2,54 +2,54 @@ + xmlns:mw="http://www.mediawiki.org/xml/export-0.2/" + targetNamespace="http://www.mediawiki.org/xml/export-0.2/" + elementFormDefault="qualified"> MediaWiki's page export format - + - + schemaLocation="http://www.w3.org/2001/xml.xsd"/> + - + + minOccurs="0" maxOccurs="unbounded"/> - + - + - + - + @@ -57,7 +57,7 @@ - + @@ -68,33 +68,33 @@ - + - + - + - + - + - + - + - + diff --git a/docs/export-0.3.xsd b/docs/export-0.3.xsd index 1e0b7c88..ea2b816e 100644 --- a/docs/export-0.3.xsd +++ b/docs/export-0.3.xsd @@ -2,48 +2,48 @@ + xmlns:mw="http://www.mediawiki.org/xml/export-0.3/" + targetNamespace="http://www.mediawiki.org/xml/export-0.3/" + elementFormDefault="qualified"> MediaWiki's page export format - + - + schemaLocation="http://www.w3.org/2001/xml.xsd"/> + - + + minOccurs="0" maxOccurs="1"/> + minOccurs="0" maxOccurs="unbounded"/> - + @@ -53,30 +53,30 @@ - + - + - + - + + minOccurs="0" maxOccurs="unbounded" /> - + @@ -84,18 +84,18 @@ - + - + - + - + @@ -103,7 +103,7 @@ - + @@ -114,7 +114,7 @@ - + @@ -122,33 +122,33 @@ - + - + - + - + - + - + - + - + diff --git a/docs/export-0.4.xsd b/docs/export-0.4.xsd index 3e7f2eab..b3ea3bf8 100644 --- a/docs/export-0.4.xsd +++ b/docs/export-0.4.xsd @@ -2,52 +2,52 @@ + xmlns:mw="http://www.mediawiki.org/xml/export-0.4/" + targetNamespace="http://www.mediawiki.org/xml/export-0.4/" + elementFormDefault="qualified"> MediaWiki's page export format - + - + schemaLocation="http://www.w3.org/2001/xml.xsd"/> + - + + minOccurs="0" maxOccurs="1"/> + minOccurs="0" maxOccurs="unbounded"/> - + @@ -57,23 +57,23 @@ - + - + - + - + @@ -83,10 +83,10 @@ + minOccurs="0" maxOccurs="unbounded" /> - + @@ -95,33 +95,33 @@ - + - + - + - + - + - + - + @@ -144,7 +144,7 @@ - + @@ -160,7 +160,7 @@ - + @@ -168,37 +168,37 @@ - + - + - + - + - + - + - + - + @@ -212,5 +212,5 @@ - + diff --git a/docs/export-0.5.xsd b/docs/export-0.5.xsd index 469446db..ed6c0029 100644 --- a/docs/export-0.5.xsd +++ b/docs/export-0.5.xsd @@ -2,54 +2,54 @@ + xmlns:mw="http://www.mediawiki.org/xml/export-0.5/" + targetNamespace="http://www.mediawiki.org/xml/export-0.5/" + elementFormDefault="qualified"> MediaWiki's page export format - + - + schemaLocation="http://www.w3.org/2001/xml.xsd"/> + - + + minOccurs="0" maxOccurs="1"/> + minOccurs="0" maxOccurs="unbounded"/> - + @@ -59,23 +59,23 @@ - + - + - + - + @@ -85,10 +85,10 @@ + minOccurs="0" maxOccurs="unbounded" /> - + @@ -97,33 +97,33 @@ - + - + - + - + - + - + - + @@ -146,7 +146,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -171,37 +171,37 @@ - + - + - + - + - + - + - + - + @@ -215,5 +215,5 @@ - + diff --git a/docs/export-0.6.xsd b/docs/export-0.6.xsd index 55428b56..4668794e 100644 --- a/docs/export-0.6.xsd +++ b/docs/export-0.6.xsd @@ -2,57 +2,57 @@ + xmlns:mw="http://www.mediawiki.org/xml/export-0.6/" + targetNamespace="http://www.mediawiki.org/xml/export-0.6/" + elementFormDefault="qualified"> MediaWiki's page export format - + - + schemaLocation="http://www.w3.org/2001/xml.xsd"/> + - + + minOccurs="0" maxOccurs="1"/> + minOccurs="0" maxOccurs="unbounded"/> - + @@ -62,23 +62,23 @@ - + - + - + - + @@ -88,10 +88,10 @@ + minOccurs="0" maxOccurs="unbounded" /> - + @@ -100,36 +100,36 @@ - + - + - + - + - + - + - + - + @@ -153,7 +153,7 @@ - + @@ -169,7 +169,7 @@ - + @@ -178,37 +178,37 @@ - + - + - + - + - + - + - + - + @@ -222,5 +222,5 @@ - + diff --git a/docs/export-0.7.xsd b/docs/export-0.7.xsd new file mode 100644 index 00000000..48037463 --- /dev/null +++ b/docs/export-0.7.xsd @@ -0,0 +1,272 @@ + + + + + + + MediaWiki's page export format + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/export-demo.xml b/docs/export-demo.xml index 77b26a41..d198b93c 100644 --- a/docs/export-demo.xml +++ b/docs/export-demo.xml @@ -1,134 +1,149 @@ - - - - - - DemoWiki + - - http://example.com/wiki/Main_Page - - - MediaWiki 1.5.0 - - - - first-letter - - - - - Media - Special - - Talk - User - User talk - DemoWiki - DemoWIki talk - Image - Image talk - MediaWiki - MediaWiki talk - Template - Template talk - Help - Help talk - Category - Category talk - - - - - - - - Page title + + + + DemoWiki + + + http://example.com/wiki/Main_Page + + + MediaWiki 1.20 + + + + first-letter + + + + Media + Special + + Talk + User + User talk + DemoWiki + DemoWIki talk + File + File talk + MediaWiki + MediaWiki talk + Template + Template talk + Help + Help talk + Category + Category talk + + - - - - 1 - - - - + + + + + Page title + + + 0 + + + + + 1 + + + + + + + edit=sysop:move=sysop + + + + + + + + + + + + 100 + + 99 + 2001-01-15T13:15:00Z + + Foobar + 42 + + + I have just one thing to say! + 5x0ux8iwjrbmfzgv6pkketxgkcnpr7h + A bunch of [[text]] here. + + + + 99 + 2001-01-15T13:10:27Z + + 10.0.0.2 + + new! + etaxt3shcge6igz1biwy3d4um2pnle4 + An earlier [[revision]]. + + - - edit=sysop:move=sysop + + Talk:Page title + 1 + 2 + + 101 + 2001-01-15T14:03:00Z + 10.0.0.2 + hey + ml80vmyjlixdstnywwihx003exfzq9j + WHYD YOU LOCK PAGE??!!! i was editing that jerk + + - + + File:Some image.jpg + 6 + 3 + + 102 + 2001-01-15T20:34:12Z + Foobar42 + My awesomeest image! + mehom37npwkpzhaiwu3wyr0egalumki + This is an awesome little imgae. I lurves it. {{PD}} + + + 2001-01-15T20:34:12Z + Foobar42 + My awesomeest image! + Some_image.jpg + http://upload.wikimedia.org/commons/2/22/Some_image.jpg + 12345 + + - - - - - - - - - 100 - - 2001-01-15T13:15:00Z - Foobar42 - - I have just one thing to say! - A bunch of [[text]] here. - + + + 15 + 2008-10-23T03:20:32Z + + Wikimedian + 12345 + + content was: 'I think this was a silly edit' + delete + delete + Silly page name + + - - 2001-01-15T13:10:27Z - 10.0.0.2 - new! - An earlier [[revision]]. - - - - - Talk:Page title - 2 - - 101 - 2001-01-15T14:03:00Z - 10.0.0.2 - hey - WHYD YOU LOCK PAGE??!!! i was editing that jerk - - - - - Image:Some image.jpg - 3 - - 102 - 2001-01-15T20:34:12Z - Foobar42 - My awesomeest image! - This is an awesome little imgae. I lurves it. {{PD}} - - - 2001-01-15T20:34:12Z - Foobar42 - My awesomeest image! - Some_image.jpg - http://upload.wikimedia.org/commons/2/22/Some_image.jpg - 12345 - - - - - 15 - 2008-10-23T03:20:32Z - - Wikimedian - 12345 - - content was: 'I think this was a silly edit' - delete - delete - Silly page name - - - - diff --git a/docs/hooks.txt b/docs/hooks.txt index a6f53c1a..ca64545f 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -245,6 +245,10 @@ $block: The block from which the autoblock is coming. 'AbortDiffCache': Can be used to cancel the caching of a diff &$diffEngine: DifferenceEngine object +'AbortEmailNotification': Can be used to cancel email notifications for an edit. +$editor: The User who made the change. +$title: The Title of the page that was edited. + 'AbortLogin': Return false to cancel account login. $user: the User object being authenticated against $password: the password being submitted, not yet checked for validity @@ -262,7 +266,7 @@ $reason: the reason for the move (added in 1.13) 'AbortNewAccount': Return false to cancel explicit account creation. $user: the User object about to be created (read-only, incomplete) -&$msg: out parameter: name of error message to display on abort +&$msg: out parameter: HTML to display on abort 'ActionBeforeFormDisplay': before executing the HTMLForm object $name: name of the action @@ -286,11 +290,17 @@ $revCount: Number of revisions in the XML file $sRevCount: Number of sucessfully imported revisions $pageInfo: associative array of page information +'AfterFinalPageOutput': Nearly at the end of OutputPage::output() but +before OutputPage::sendCacheControl() and final ob_end_flush() which +will send the buffered output to the client. This allows for last-minute +modification of the output within the buffer by using ob_get_clean(). +$output: The OutputPage object where output() was called + 'AjaxAddScript': Called in output page just before the initialisation of the javascript ajax engine. The hook is only called when ajax is enabled ( $wgUseAjax = true; ). -'AlternateEdit': before checking if an user can edit a page and +'AlternateEdit': before checking if a user can edit a page and before showing the edit form ( EditPage::edit() ). This is triggered on &action=edit. $EditPage: the EditPage object @@ -310,6 +320,14 @@ $body: Body of the message Use this to extend core API modules. &$module: Module object +'ApiCheckCanExecute': Called during ApiMain::checkCanExecute. Use to +further authenticate and authorize API clients before executing the +module. Return false and set a message to cancel the request. +$module: Module object +$user: Current user +&$message: API usage message to die with, as a message key or array +as accepted by ApiBase::dieUsageMsg. + 'APIEditBeforeSave': before saving a page with api.php?action=edit, after processing request parameters. Return false to let the request fail, returning an error message or an tag @@ -331,6 +349,11 @@ descriptions. &$module: ApiBase Module object &$desc: Array of parameter descriptions +'APIGetResultProperties': use this hook to mofify the properties +in a module's result. +&$module: ApiBase Module object +&$properties: Array of properties + 'APIQueryAfterExecute': after calling the execute() method of an action=query submodule. Use this to extend core API modules. &$module: Module object @@ -388,6 +411,11 @@ is the User object. In the hook, just add your callback to the $tokenFunctions array and return true (returning false makes no sense) $tokenFunctions: array(action => callback) +'ApiMain::onException': Called by ApiMain::executeActionWithErrorHandling() +when an exception is thrown during API action execution. +$apiMain: Calling ApiMain instance. +$e: Exception object. + 'ApiRsdServiceApis': Add or remove APIs from the RSD services list. Each service should have its own entry in the $apis array and have a unique name, passed as key for the array that represents the service data. @@ -395,6 +423,11 @@ In this data array, the key-value-pair identified by the apiLink key is required. &$apis: array of services +'ApiTokensGetTokenTypes': use this hook to extend action=tokens with new +token types. +&$tokenTypes: supported token types in format 'type' => callback function +used to retrieve this type of tokens. + 'ArticleAfterFetchContent': after fetching content of an article from the database $article: the article (object) being loaded from the database @@ -417,6 +450,8 @@ $user: the user (object) deleting the article $reason: the reason (string) the article is being deleted $error: if the deletion was prohibited, the (raw HTML) error message to display (added in 1.13) +$status: Status object, modify this to throw an error. Overridden by $error + (added in 1.20) 'ArticleDeleteComplete': after an article is deleted $article: the WikiPage that was deleted @@ -667,6 +702,10 @@ $output: OutputPage object in use 'CategoryPageView': before viewing a categorypage in CategoryPage::view $catpage: CategoryPage instance +'ChangePasswordForm': For extensions that need to add a field to the ChangePassword form +via the Preferences form +&$extraFields: An array of arrays that hold fields like would be passed to the pretty function. + 'ChangesListInsertArticleLink': Override or augment link to article in RC list. &$changesList: ChangesList instance. &$articlelink: HTML of link to article (already filled-in). @@ -687,10 +726,18 @@ $user: user (object) whose email is being confirmed &$pager: Pager object for contributions &$queryInfo: The query for the contribs Pager +'ContribsPager::reallyDoQuery': Called before really executing the query for My Contributions +&$data: an array of results of all contribs queries +$pager: The ContribsPager object hooked into +$offset: Index offset, inclusive +$limit: Exact query limit +$descending: Query direction, false for ascending, true for descending + 'ContributionsLineEnding': Called before a contributions HTML line is finished $page: SpecialPage object for contributions -$ret: the HTML line +&$ret: the HTML line $row: the DB row for this line +&$classes: the classes to add to the surrounding
  • 'ContributionsToolLinks': Change tool links above Special:Contributions $id: User identifier @@ -735,11 +782,11 @@ $title: Title object for the title being linked to (may not be the same as $wgTitle, if the section is included from a template) $section: The designation of the section being pointed to, to be included in the link, like "§ion=$section" -$tooltip: The default tooltip. Escape with htmlspecialchars() before using. +$tooltip: The default tooltip. Escape before using. By default, this is wrapped in the 'editsectionhint' message. &$result: The HTML to return, prefilled with the default plus whatever other changes earlier hooks have made -$lang: The language code to use for the link in the wfMsg* functions +$lang: The language code to use for the link in the wfMessage function 'EditFilter': Perform checks on an edit $editor: Edit form (see includes/EditPage.php) @@ -774,12 +821,13 @@ $request: Webrequest return value is ignored (should always return true) 'EditPage::showEditForm:fields': allows injection of form field into edit form -&$editor: the EditPage instance for reference -&$out: an OutputPage instance to write to +$editor: the EditPage instance for reference +$out: an OutputPage instance to write to return value is ignored (should always return true) 'EditPage::showEditForm:initial': before showing the edit form $editor: EditPage instance (object) +$out: an OutputPage instance to write to Return false to halt editing; you'll need to handle error messages, etc. yourself. Alternatively, modifying $error and returning true will cause the @@ -839,7 +887,7 @@ $title: Title being linked to $section: Section to link to $link: Default link &$result: Result (alter this to override the generated links) -$lang: The language code to use for the link in the wfMsg* functions +$lang: The language code to use for the link in the wfMessage function 'EmailConfirmed': When checking that the user's email address is "confirmed" $user: User being checked @@ -898,6 +946,12 @@ $article: in case all revisions of the file are deleted a reference to the $user: user who performed the deletion $reason: reason +'FileTransformed': When a file is transformed and moved into storage +$file: reference to the File object +$thumb: the MediaTransformOutput object +$tmpThumbPath: The temporary file system path of the transformed file +$thumbPath: The permanent storage path of the transformed file + 'FileUpload': When a file upload occurs $file : Image object representing the file that was uploaded $reupload : Boolean indicating if there was a previously another image there or not (since 1.17) @@ -909,6 +963,14 @@ $fileVersions: array of undeleted versions. Empty if all versions were restored $user: user who performed the undeletion $reason: reason +'FormatAutocomments': When an autocomment is formatted by the Linker + &$comment: Reference to the accumulated comment. Initially null, when set the default code will be skipped. + $pre: Initial part of the parsed comment before the call to the hook. + $auto: The extracted part of the parsed comment before the call to the hook. + $post: The final part of the parsed comment before the call to the hook. + $title: An optional title object used to links to sections. Can be null. + $local: Boolean indicating whether section links should refer to local page. + 'GetAutoPromoteGroups': When determining which autopromote groups a user is entitled to be in. &$user: user to promote. @@ -996,6 +1058,11 @@ $result: User permissions error to add. If none, return true. 'getUserPermissionsErrorsExpensive': Absolutely the same, but is called only if expensive checks are enabled. +'GitViewers': called when generating the list of git viewers for Special:Version, use + this to change the list. +&$extTypes: associative array of repo URLS to viewer URLs. + + 'ImageBeforeProduceHTML': Called before producing the HTML created by a wiki image insertion. You can skip the default logic entirely by returning false, or just modify a few things using call-by-reference. @@ -1003,9 +1070,9 @@ $result: User permissions error to add. If none, return true. &$title: Title object of the image &$file: File object, or false if it doesn't exist &$frameParams: Various parameters with special meanings; see documentation in - includes/Linker.php for Linker::makeImageLink2 + includes/Linker.php for Linker::makeImageLink &$handlerParams: Various parameters with special meanings; see documentation in - includes/Linker.php for Linker::makeImageLink2 + includes/Linker.php for Linker::makeImageLink &$time: Timestamp of file in 'YYYYMMDDHHIISS' string form, or false for current &$res: Final HTML output, used if you return false @@ -1072,6 +1139,10 @@ $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 ($wgTitle) $request: WebRequest @@ -1085,8 +1156,16 @@ $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 noinclude/includeonly/onlyinclude and other processing. +but after nowiki/noinclude/includeonly/onlyinclude and other processings. &$parser: Parser object &$text: string containing partially parsed text &$stripState: Parser's internal StripState object @@ -1227,7 +1306,7 @@ $param: Associative Array with the following additional options: - lim Integer Limit of items to show, default is 50 - 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), "No matching items in log" is displayed if loglist is empty - - msgKey Array If you want a nice box with a message, set this to the key of the message. First element is the message key, additional optional elements are parameters for the key that are processed with wfMsgExt and option 'parse' + - msgKey Array If you want a nice box with a message, set this to the key of the message. First element is the message key, 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 "<div ...>$1</div>"). - flags Integer display flags (NO_ACTION_LINK,NO_EXTRA_USER_LINKS) @@ -1243,7 +1322,7 @@ $data: Associative array of data for handlers to record. It must include values - 'comment' Wikitext string in the same format as an edit summary - 'timestamp' Timestamp when the action occured -LoginAuthenticateAudit': a login attempt for a valid user account either +'LoginAuthenticateAudit': a login attempt for a valid user account either succeeded or failed. No return data is accepted; this hook is for auditing only. $user: the User object being authenticated against $password: the password being submitted and found wanting @@ -1334,6 +1413,11 @@ using this hook. BaseTemplate::makeListItem for details on the format of individual items inside of this array +'NamespaceIsMovable': Called when determining if it is possible to pages in a namespace. +$index: Integer; the index of the namespace being checked. +$result: Boolean; whether MediaWiki currently thinks that pages in this namespace are movable. +Hooks may change this value to override the return value of MWNamespace::isMovable() + 'NewRevisionFromEditComplete': called when a revision was inserted due to an edit $article: the WikiPage edited @@ -1421,6 +1505,12 @@ A parser extension which depends on user options should install this hook and append its values to the key. $hash: reference to a hash key string which can be modified +'ParserAfterParse': Called from Parser::parse() just after the call to +Parser::internalParse() returns +$parser: parser object +$text: text being parsed +$stripState: stripState used (object) + 'ParserAfterStrip': Same as ParserBeforeStrip 'ParserAfterTidy': Called after Parser::tidy() in Parser::parse() @@ -1477,6 +1567,7 @@ to modify the parameters of the image. $title: title object representing the file $file: file object that will be used to create the image &$params: 2-D array of parameters +$parser: Parser object that called the hook 'ParserSectionCreate': Called each time the parser creates a document section from wikitext. Use this to apply per-section modifications to HTML (like @@ -1493,6 +1584,10 @@ $showEditLinks: boolean describing whether this section has an edit link maintenance/parserTests.inc $parser: Parser object created +'ParserTestGlobals': Allows to define globals for parser tests. +&$globals: Array with all the globals which should be set for parser tests. + The arrays keys serve as the globals names, its values are the globals values. + 'ParserTestTables': alter the list of tables to duplicate when parser tests are run. Use when page save hooks require the presence of custom tables to ensure that tests continue to run properly. @@ -1520,7 +1615,7 @@ Return false and put the merged text into $text to override the default behavior 'PreferencesGetLegend': Override the text used for the of a preferences section $form: the PreferencesForm object. This is a ContextSource as well $key: the section name -&$legend: the legend text. Defaults to wfMsg( "prefs-$key" ) but may be overridden +&$legend: the legend text. Defaults to wfMessage( "prefs-$key" )->text() but may be overridden 'PrefixSearchBackend': Override the title prefix search used for OpenSearch and AJAX search suggestions. Put results into &$results outparam and return false. @@ -1558,6 +1653,11 @@ $out: OutputPage object 'RecentChange_save': called at the end of RecentChange::save() $recentChange: RecentChange object +'RedirectSpecialArticleRedirectParams': lets you alter the set of +parameter names such as "oldid" that are preserved when using +redirecting special pages such as Special:MyPage and Special:MyTalk. +&$redirectParams: An array of parameters preserved by redirecting special pages. + 'RequestContextCreateSkin': Called when RequestContext::getSkin creates a skin instance. Can be used by an extension override what skin is used in certain contexts. IContextSource $context: The RequestContext the skin is being created for. @@ -1621,6 +1721,11 @@ in the $searchEngine->namespaces array. $query : Original query. &$parsed : Resultant query with the prefixes stripped. +'SearchResultInitFromTitle': Set the revision used when displaying a page in +search results. +$title : Current Title object being displayed in search results. +&$id: Revision ID (default is false, for latest) + 'SearchableNamespaces': An option to modify which namespaces are searchable. &$arr : Array of namespaces ($nsId => $name) which will be used. @@ -1788,6 +1893,14 @@ Each key maps to an associative array with a 'msg' (message key) and a 'default' hook to remove a core special page $list: list (array) of core special pages +'SpecialPageAfterExecute': called after SpecialPage::execute +$special: the SpecialPage object +$subPage: the subpage string or null if no subpage was specified + +'SpecialPageBeforeExecute': called before SpecialPage::execute +$special: the SpecialPage object +$subPage: the subpage string or null if no subpage was specified + 'SpecialPasswordResetOnSubmit': when executing a form submission on Special:PasswordReset $users: array of User objects $data: array of data submitted by the user @@ -1908,6 +2021,12 @@ $title: The title in question. $title: Title object that is being checked $result: Boolean; whether MediaWiki currently thinks this is a CSS/JS page. Hooks may change this value to override the return value of Title::isCssOrJsPage() +'TitleIsAlwaysKnown': Called when determining if a page exists. +Allows overriding default behaviour for determining if a page exists. +If $isKnown is kept as null, regular checks happen. If it's a boolean, this value is returned by the isKnown method. +$title: Title object that is being checked +$result: Boolean|null; whether MediaWiki currently thinks this page is known + 'TitleIsMovable': Called when determining if it is possible to move a page. Note that this hook is not called for interwiki pages or pages in immovable namespaces: for these, isMovable() always returns false. $title: Title object that is being checked @@ -2234,9 +2353,9 @@ One, and only one hook should set this, and return false. &$opts: Options to use for the query &$join: Join conditions -'wfShellMaintenanceCmd': Called when generating a shell-escaped command line - string to run a maintenance script. -&$script: MediaWiki maintenance script path +'wfShellWikiCmd': Called when generating a shell-escaped command line + string to run a MediaWiki cli script. +&$script: MediaWiki cli script path &$parameters: Array of arguments and options to the script &$options: Associative array of options, may contain the 'php' and 'wrapper' keys diff --git a/docs/language.txt b/docs/language.txt index 1df98810..42a60279 100644 --- a/docs/language.txt +++ b/docs/language.txt @@ -1,21 +1,5 @@ language.txt -The Language object handles all readable text produced by the software. The most -used function is getMessage(), usually called with the wrapper function wfMsg() -which calls that method on the global language object. It just returns a piece -of text given a text key. It is recommended that you use each key only -once--bits of text in different contexts that happen to be identical in English -may not be in other languages, so it's better to add new keys than to reuse them -a lot. Likewise, if there is text that gets combined with things like names and -titles, it is better to put markers like "$1" inside a piece of text and use -str_replace() than to compose such messages in code, because their order may -change in other languages too. +The Language object handles all readable text produced by the software. -While the system is running, there will be one global language object, which -will be a subtype of Language. The methods in these objects will return the -native text requested if available, otherwise they fall back to sending English -text (which is why the LanguageEn object has no code at all--it just inherits -the English defaults of the Language base class). - -The names of the namespaces are also contained in the language object, though -the numbers are fixed. +See http://www.mediawiki.org/wiki/Localisation#General_use_.28for_developers.29 diff --git a/docs/magicword.txt b/docs/magicword.txt index ceae0262..1d9bf7d4 100644 --- a/docs/magicword.txt +++ b/docs/magicword.txt @@ -40,7 +40,7 @@ $magicWords['es'] = array( ); ---- -$wgExtensionMessagesFiles['ExtensionNameMagic'] = dirname( __FILE__ ) . '/ExtensionName.i18n.magic.php'; +$wgExtensionMessagesFiles['ExtensionNameMagic'] = __DIR__ . '/ExtensionName.i18n.magic.php'; $wgHooks['MagicWordwgVariableIDs'][] = 'wfAddCustomMagicWordID'; $wgHooks['ParserGetVariableValueSwitch'][] = 'wfGetCustomMagicWordValue'; @@ -74,7 +74,7 @@ $magicWords['es'] = array( ); ---- -$wgExtensionMessagesFiles['ExtensionNameMagic'] = dirname( __FILE__ ) . '/ExtensionName.i18n.magic.php'; +$wgExtensionMessagesFiles['ExtensionNameMagic'] = __DIR__ . '/ExtensionName.i18n.magic.php'; $wgHooks['ParserFirstCallInit'][] = 'wfRegisterCustomMagicWord'; function wfRegisterCustomMagicWord( &$parser ){ diff --git a/docs/memcached.txt b/docs/memcached.txt index f5384f9d..3872edc8 100644 --- a/docs/memcached.txt +++ b/docs/memcached.txt @@ -138,7 +138,7 @@ Message Cache: key: $wgDBname:messages, $wgDBname:messages-hash, $wgDBname:messages-status ex: wikidb:messages, wikidb:messages-hash, wikidb:messages-status stores: an array where the keys are DB keys and the values are messages - set in: wfMsg(), Article::editUpdates() and Title::moveTo() + set in: wfMessage(), Article::editUpdates() and Title::moveTo() expriy: $wgMsgCacheExpiry cleared by: nothing diff --git a/docs/uidesign/mediawiki.action.history.diff.html b/docs/uidesign/mediawiki.action.history.diff.html index fdc54aa3..7b8eb2a0 100644 --- a/docs/uidesign/mediawiki.action.history.diff.html +++ b/docs/uidesign/mediawiki.action.history.diff.html @@ -5,9 +5,9 @@

    -This show various styles for our diff action, the background being hardcoded to gray (#C0C0C0) The reference style sheet is:

    +This show various styles for our diff action, the background being hardcoded to gray (#C0C0C0) The reference style sheet is:

    -resources/mediawiki.action/mediawiki.action.history.diff.css. +resources/mediawiki.action/mediawiki.action.history.diff.css.

    This file might help us fix our diff colors which have been a recurring issues among the community for a loooong time.

    @@ -35,12 +35,12 @@ Below are some basic lines being applied one or two classes. Mainly for debuggin Diff - diff-addedline: added line - diff-deletedline: deleted line - diff-context: context + diff-addedline: added line + diff-deletedline: deleted line + diff-context: context - Same as above with a <span> child element having the diffchange class + Same as above with a <span> child element having the diffchange class Diffchange -- cgit v1.2.2