Last modified: 2012-12-26 03:34:45 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T21183, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19183 - disambiguationspage should ship with [[ ]]
disambiguationspage should ship with [[ ]]
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
1.16.x
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 2814
  Show dependency treegraph
 
Reported: 2009-06-13 23:28 UTC by Dan Jacobson
Modified: 2012-12-26 03:34 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dan Jacobson 2009-06-13 23:28:18 UTC
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".
Comment 1 Brion Vibber 2009-06-23 01:01:19 UTC
Looks like it should work fine:

# 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) {
		# 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
	[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.
Comment 2 Dan Jacobson 2009-06-23 17:24:39 UTC
(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.)
Comment 3 Tim Landscheidt 2012-12-26 03:34:45 UTC
This works for me in current HEAD, and if it didn't work in 1.16, that'd be obsolete by now.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links