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.
* Daniel Friesen
* Greg Sabino Mullane
* Hojjat
+* Leon Weber
* Mohamed Magdy
* Raimond Spekking
* Roan Kattouw
* Tim Starling
== Patch Contributors ==
-* RememberTheDot
+* Daniel Arnold
* Max Semenik
+* RememberTheDot
== Translators ==
* Anders Wegge Jakobsen
in a div with class "templatesUsed"
* (bug 14868) Setting $wgFeedDiffCutoff to 0 now disables generation of the diff
entirely, not just the display of it.
+* (bug 6387) Introduced new setting $wgCategoryPrefixedDefaultSortkey which
+ allows having the unprefixed page title as the default category sortkey
=== API changes in 1.14 ===
*/
$wgCategoryPagingLimit = 200;
+/**
+ * Should the default category sortkey be the prefixed title?
+ * Run maintenance/refreshLinks.php after changing this.
+ */
+$wgCategoryPrefixedDefaultSortkey = true;
+
/**
* Browser Blacklist for unicode non compliant browsers
* Contains a list of regexps : "/regexp/" matching problematic browsers
* @return string
*/
public function getDefaultSort() {
+ global $wgCategoryPrefixedDefaultSortkey;
if( $this->mDefaultSort !== false ) {
return $this->mDefaultSort;
+ } elseif ($this->mTitle->getNamespace() == NS_CATEGORY ||
+ !$wgCategoryPrefixedDefaultSortkey) {
+ return $this->mTitle->getText();
} else {
- return $this->mTitle->getNamespace() == NS_CATEGORY
- ? $this->mTitle->getText()
- : $this->mTitle->getPrefixedText();
+ return $this->mTitle->getPrefixedText();
}
}