using properties in the SpecialPrefixindex class.
* (bug 50310) BREAKING CHANGE: wikibits: Drop support for mwCustomEditButtons.
It defaults to an empty array and emits mw.log.warn when accessed.
+* BREAKING CHANGE: Special:Disambiguations has been removed from MediaWiki core.
+ Functions related to disambiguation pages are now handled by the Disambiguator
+ extension (https://www.mediawiki.org/wiki/Extension:Disambiguator) (bug
+ 35981).
== Compatibility ==
'DeadendPagesPage' => 'includes/specials/SpecialDeadendpages.php',
'DeletedContribsPager' => 'includes/specials/SpecialDeletedContributions.php',
'DeletedContributionsPage' => 'includes/specials/SpecialDeletedContributions.php',
- 'DisambiguationsPage' => 'includes/specials/SpecialDisambiguations.php',
'DoubleRedirectsPage' => 'includes/specials/SpecialDoubleRedirects.php',
'EditWatchlistCheckboxSeriesField' => 'includes/specials/SpecialEditWatchlist.php',
'EditWatchlistNormalHTMLForm' => 'includes/specials/SpecialEditWatchlist.php',
array( 'AncientPagesPage', 'Ancientpages' ),
array( 'BrokenRedirectsPage', 'BrokenRedirects' ),
array( 'DeadendPagesPage', 'Deadendpages' ),
- array( 'DisambiguationsPage', 'Disambiguations' ),
array( 'DoubleRedirectsPage', 'DoubleRedirects' ),
array( 'FileDuplicateSearchPage', 'FileDuplicateSearch' ),
array( 'LinkSearchPage', 'LinkSearch' ),
'Allpages' => 'SpecialAllpages',
'Prefixindex' => 'SpecialPrefixindex',
'Categories' => 'SpecialCategories',
- 'Disambiguations' => 'DisambiguationsPage',
'Listredirects' => 'ListredirectsPage',
'PagesWithProp' => 'SpecialPagesWithProp',
+++ /dev/null
-<?php
-/**
- * Implements Special:Disambiguations
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup SpecialPage
- */
-
-/**
- * A special page that lists pages containing links to disambiguations pages
- *
- * @ingroup SpecialPage
- */
-class DisambiguationsPage extends QueryPage {
- function __construct( $name = 'Disambiguations' ) {
- parent::__construct( $name );
- }
-
- function isExpensive() {
- return true;
- }
-
- function isSyndicated() {
- return false;
- }
-
- function getPageHeader() {
- return $this->msg( 'disambiguations-text' )->parseAsBlock();
- }
-
- /**
- * @return string|bool False on failure
- */
- function getQueryFromLinkBatch() {
- $dbr = wfGetDB( DB_SLAVE );
- $dMsgText = $this->msg( 'disambiguationspage' )->inContentLanguage()->text();
- $linkBatch = new LinkBatch;
-
- # If the text can be treated as a title, use it verbatim.
- # Otherwise, pull the titles from the links table
- $dp = Title::newFromText( $dMsgText );
- if ( $dp ) {
- if ( $dp->getNamespace() != NS_TEMPLATE ) {
- # @todo FIXME: We assume the disambiguation message is a template but
- # the page can potentially be from another namespace :/
- wfDebug( "Mediawiki:disambiguationspage message does not refer to a template!\n" );
- }
- $linkBatch->addObj( $dp );
- } else {
- # Get all the templates linked from the Mediawiki:Disambiguationspage
- $disPageObj = Title::makeTitleSafe( NS_MEDIAWIKI, 'disambiguationspage' );
- $res = $dbr->select(
- array( 'pagelinks', 'page' ),
- 'pl_title',
- array(
- 'page_id = pl_from',
- 'pl_namespace' => NS_TEMPLATE,
- 'page_namespace' => $disPageObj->getNamespace(),
- 'page_title' => $disPageObj->getDBkey()
- ),
- __METHOD__
- );
-
- foreach ( $res as $row ) {
- $linkBatch->addObj( Title::makeTitle( NS_TEMPLATE, $row->pl_title ) );
- }
- }
- $set = $linkBatch->constructSet( 'tl', $dbr );
-
- if ( $set === false ) {
- # We must always return a valid SQL query, but this way
- # the DB will always quickly return an empty result
- $set = 'FALSE';
- wfDebug( "Mediawiki:disambiguationspage message does not link to any templates!\n" );
- }
-
- return $set;
- }
-
- function getQueryInfo() {
- // @todo FIXME: What are pagelinks and p2 doing here?
- return array(
- 'tables' => array(
- 'templatelinks',
- 'p1' => 'page',
- 'pagelinks',
- 'p2' => 'page'
- ),
- 'fields' => array(
- 'namespace' => 'p1.page_namespace',
- 'title' => 'p1.page_title',
- 'value' => 'pl_from'
- ),
- 'conds' => array(
- $this->getQueryFromLinkBatch(),
- 'p1.page_id = tl_from',
- 'pl_namespace = p1.page_namespace',
- 'pl_title = p1.page_title',
- 'p2.page_id = pl_from',
- 'p2.page_namespace' => MWNamespace::getContentNamespaces()
- )
- );
- }
-
- function getOrderFields() {
- return array( 'tl_namespace', 'tl_title', 'value' );
- }
-
- function sortDescending() {
- return false;
- }
-
- /**
- * Fetch links and cache their existence
- *
- * @param DatabaseBase $db
- * @param ResultWrapper $res
- */
- function preprocessResults( $db, $res ) {
- if ( !$res->numRows() ) {
- return;
- }
-
- $batch = new LinkBatch;
- foreach ( $res as $row ) {
- $batch->add( $row->namespace, $row->title );
- }
- $batch->execute();
-
- $res->seek( 0 );
- }
-
- /**
- * @param Skin $skin
- * @param object $result Result row
- * @return string
- */
- function formatResult( $skin, $result ) {
- $title = Title::newFromID( $result->value );
- $dp = Title::makeTitle( $result->namespace, $result->title );
-
- $from = Linker::link( $title );
- $edit = Linker::link(
- $title,
- $this->msg( 'parentheses', $this->msg( 'editlink' )->text() )->escaped(),
- array(),
- array( 'redirect' => 'no', 'action' => 'edit' )
- );
- $arr = $this->getLanguage()->getArrow();
- $to = Linker::link( $dp );
-
- return "$from $edit $arr $to";
- }
-
- protected function getGroupName() {
- return 'pages';
- }
-}
'CreateAccount' => array( 'CreateAccount' ),
'Deadendpages' => array( 'DeadendPages' ),
'DeletedContributions' => array( 'DeletedContributions' ),
- 'Disambiguations' => array( 'Disambiguations' ),
'DoubleRedirects' => array( 'DoubleRedirects' ),
'EditWatchlist' => array( 'EditWatchlist' ),
'Emailuser' => array( 'EmailUser' ),
'pool-queuefull' => 'Pool queue is full',
'pool-errorunknown' => 'Unknown error',
-# All link text and link target definitions of links into project namespace that get used by other message strings, with the exception of user group pages (see grouppage) and the disambiguation template definition (see disambiguations).
+# All link text and link target definitions of links into project namespace that get used by other message strings, with the exception of user group pages (see grouppage).
'aboutsite' => 'About {{SITENAME}}',
'aboutpage' => 'Project:About',
'copyright' => 'Content is available under $1.',
'statistics-mostpopular' => 'Most viewed pages',
'statistics-footer' => '', # do not translate or duplicate this message to other languages
-'disambiguations' => 'Pages linking to disambiguation pages',
-'disambiguations-summary' => '', # do not translate or duplicate this message to other languages
-'disambiguationspage' => 'Template:disambig',
-'disambiguations-text' => "The following pages contain at least one link to a '''disambiguation page'''.
-They may have to link to a more appropriate page instead.<br />
-A page is treated as a disambiguation page if it uses a template that is linked from [[MediaWiki:Disambiguationspage]].",
-
'pageswithprop' => 'Pages with a page property',
'pageswithprop-summary' => '', # do not translate or duplicate this message to other languages
'pageswithprop-legend' => 'Pages with a page property',
Deletedrevs
Denied
Dfile
-Disambiguations
Double
Duplicate
EAGAIN
'statistics-mostpopular',
'statistics-footer',
),
- 'disambiguations' => array(
- 'disambiguations',
- 'disambiguations-summary',
- 'disambiguationspage',
- 'disambiguations-text',
- ),
'pageswithprop' => array(
'pageswithprop',
'pageswithprop-summary',
'cologneblue' => 'Cologne Blue skin',
'vector' => 'Vector skin',
'miscellaneous2' => '',
- 'links' => 'All link text and link target definitions of links into project namespace that get used by other message strings, with the exception of user group pages (see grouppage) and the disambiguation template definition (see disambiguations).',
+ 'links' => 'All link text and link target definitions of links into project namespace that get used by other message strings, with the exception of user group pages (see grouppage).',
'badaccess' => '',
'versionrequired' => '',
'miscellaneous3' => '',
'randomincategory' => 'Random page in category',
'randomredirect' => 'Random redirect',
'statistics' => 'Statistics',
- 'disambiguations' => '',
'pageswithprop' => '',
'doubleredirects' => '',
'brokenredirects' => '',
</td><td>
<template lineStart="1"><title>int:Difference</title></template>
</td></tr><tr><td>
-[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:Disambiguations&action=edit disambiguations]<br>
-[[MediaWiki_talk:Disambiguations|Talk]]
-</td><td>
-Disambiguation pages
-</td><td>
-<template lineStart="1"><title>int:Disambiguations</title></template>
-</td></tr><tr><td>
-[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:Disambiguationspage&action=edit disambiguationspage]<br>
-[[MediaWiki_talk:Disambiguationspage|Talk]]
-</td><td>
-Wiktionary:Links_to_disambiguating_pages
-</td><td>
-<template lineStart="1"><title>int:Disambiguationspage</title></template>
-</td></tr><tr><td>
-[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:Disambiguationstext&action=edit disambiguationstext]<br>
-[[MediaWiki_talk:Disambiguationstext|Talk]]
-</td><td>
-The following pages link to a &lt;i&gt;disambiguation page&lt;/i&gt;. They should link to the appropriate topic instead.&lt;br /&gt;A page is treated as dismbiguation if it is linked from $1.&lt;br /&gt;Links from other namespaces are &lt;i&gt;not&lt;/i&gt; listed here.
-</td><td>
-<template lineStart="1"><title>int:Disambiguationstext</title></template>
-</td></tr><tr><td>
[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:Disclaimerpage&action=edit disclaimerpage]<br>
[[MediaWiki_talk:Disclaimerpage|Talk]]
</td><td>
</td><td>
{{int:Difference}}
</td></tr><tr><td>
-[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:Disambiguations&action=edit disambiguations]<br>
-[[MediaWiki_talk:Disambiguations|Talk]]
-</td><td>
-Disambiguation pages
-</td><td>
-{{int:Disambiguations}}
-</td></tr><tr><td>
-[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:Disambiguationspage&action=edit disambiguationspage]<br>
-[[MediaWiki_talk:Disambiguationspage|Talk]]
-</td><td>
-Wiktionary:Links_to_disambiguating_pages
-</td><td>
-{{int:Disambiguationspage}}
-</td></tr><tr><td>
-[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:Disambiguationstext&action=edit disambiguationstext]<br>
-[[MediaWiki_talk:Disambiguationstext|Talk]]
-</td><td>
-The following pages link to a <i>disambiguation page</i>. They should link to the appropriate topic instead.<br />A page is treated as dismbiguation if it is linked from $1.<br />Links from other namespaces are <i>not</i> listed here.
-</td><td>
-{{int:Disambiguationstext}}
-</td></tr><tr><td>
[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:Disclaimerpage&action=edit disclaimerpage]<br>
[[MediaWiki_talk:Disclaimerpage|Talk]]
</td><td>