Page MenuHomePhabricator

disambiguationspage should ship with [[ ]]
Closed, DeclinedPublic

Description

For all languages, you need to change
-'disambiguationspage' => 'Template:disambig',
+'disambiguationspage' => '[[Template:disambig]]',
if Special:Disambiguations is ever to detect it.

Or maybe your intention is to give giving "CPU saving defused examples".
But many people will then wonder "why aren't they working".


Version: 1.16.x
Severity: enhancement

Details

Reference
bz19183

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:42 PM
bzimport set Reference to bz19183.
bzimport added a subscriber: Unknown Object (MLST).

Looks like it should work fine:

  1. If the text can be treated as a title, use it verbatim.
  2. Otherwise, pull the titles from the links table

$dp = Title::newFromText($dMsgText);
if( $dp ) {
if($dp->getNamespace() != NS_TEMPLATE) {

  1. FIXME we assume the disambiguation message is a template but
  2. the page can potentially be from another namespace :/
		wfDebug("Mediawiki:disambiguationspage message does not refer to a template!\n");

}
$linkBatch->addObj( $dp );
} else {

  1. Get all the templates linked from the Mediawiki:Disambiguationspage

[snip]
}

IMO this is pretty awkward -- requires no brackets for a single item, *or* brackets around multiple items -- but it'll work. In fact, it would *fail* to work if the requested change were made, since on a default install the page wouldn't be recorded in the database until it was customized, so the check for live templatelinks would fail to recover anything.

(Well on my wikis, instead of hoping folks can make heads or tails of
what is meant, I just chuck 'Disambiguations' into my LocalSettings.php's

function JidanniLessSpecialPages(&$list){
foreach(array('Uncategorizedimages','Unusedimages','Withoutinterwiki','Upload',
'Newimages','Listfiles','MIMEsearch','FileDuplicateSearch','Filepath','Booksources','Mostimages','Tags','Disambiguations'

	      )as $i){unset($list[$i]);}global $wgUser;if(!$wgUser->isAllowed('editinterface')){unset($list[Ipblocklist]);}

return true;}$wgHooks['SpecialPage_initList'][]='JidanniLessSpecialPages';

and poof, it's gone.)

This works for me in current HEAD, and if it didn't work in 1.16, that'd be obsolete by now.