r38992 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38991‎ | r38992 | r38993 >
Date:11:19, 9 August 2008
Author:leon
Status:old (Comments)
Tags:
Comment:
(bug 6387) Introduced new setting $wgCategoryPrefixedDefaultSortkey which
allows having the unprefixed page title as the default category sortkey.

Although creating sane defaults should always be preferred over introducing
new config options, we cannot just remove the old behaviour here, as some
peoply might still rely on it. However, the sortkey {{PAGENAME}} is already
widely used for circumventing the current behaviour.
Modified paths:
  • /trunk/phase3/CREDITS (modified) (history)
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/CREDITS
@@ -11,6 +11,7 @@
1212 * Daniel Friesen
1313 * Greg Sabino Mullane
1414 * Hojjat
 15+* Leon Weber
1516 * Mohamed Magdy
1617 * Raimond Spekking
1718 * Roan Kattouw
@@ -20,8 +21,9 @@
2122 * Tim Starling
2223
2324 == Patch Contributors ==
 25+* Daniel Arnold
 26+* Max Semenik
2427 * RememberTheDot
25 -* Max Semenik
2628
2729 == Translators ==
2830 * Anders Wegge Jakobsen
Index: trunk/phase3/includes/parser/Parser.php
@@ -4831,12 +4831,14 @@
48324832 * @return string
48334833 */
48344834 public function getDefaultSort() {
 4835+ global $wgCategoryPrefixedDefaultSortkey;
48354836 if( $this->mDefaultSort !== false ) {
48364837 return $this->mDefaultSort;
 4838+ } elseif ($this->mTitle->getNamespace() == NS_CATEGORY ||
 4839+ !$wgCategoryPrefixedDefaultSortkey) {
 4840+ return $this->mTitle->getText();
48374841 } else {
4838 - return $this->mTitle->getNamespace() == NS_CATEGORY
4839 - ? $this->mTitle->getText()
4840 - : $this->mTitle->getPrefixedText();
 4842+ return $this->mTitle->getPrefixedText();
48414843 }
48424844 }
48434845
Index: trunk/phase3/includes/DefaultSettings.php
@@ -2481,6 +2481,12 @@
24822482 $wgCategoryPagingLimit = 200;
24832483
24842484 /**
 2485+ * Should the default category sortkey be the prefixed title?
 2486+ * Run maintenance/refreshLinks.php after changing this.
 2487+ */
 2488+$wgCategoryPrefixedDefaultSortkey = true;
 2489+
 2490+/**
24852491 * Browser Blacklist for unicode non compliant browsers
24862492 * Contains a list of regexps : "/regexp/" matching problematic browsers
24872493 */
Index: trunk/phase3/RELEASE-NOTES
@@ -87,6 +87,8 @@
8888 in a div with class "templatesUsed"
8989 * (bug 14868) Setting $wgFeedDiffCutoff to 0 now disables generation of the diff
9090 entirely, not just the display of it.
 91+* (bug 6387) Introduced new setting $wgCategoryPrefixedDefaultSortkey which
 92+ allows having the unprefixed page title as the default category sortkey
9193
9294 === API changes in 1.14 ===
9395

Comments

#Comment by MZMcBride (talk | contribs)   11:15, 15 April 2012

This setting was removed in r70416.

Status & tagging log