From: Tim Starling Date: Sun, 20 Mar 2005 02:53:23 +0000 (+0000) Subject: Option to turn special page sorting feature off X-Git-Tag: 1.5.0alpha1~569 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=83447be90fb6695b4b5fc87c4efe26b84c470b70;p=lhc%2Fweb%2Fwiklou.git Option to turn special page sorting feature off --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 95300668a6..7245ef54de 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1183,6 +1183,10 @@ $wgNoFollowLinks = true; */ $wgMinimalPasswordLength = 0; +/** Whether or not to sort special pages in Special:Specialpages */ + +$wgSortSpecialPages = true; + } else { die(); } diff --git a/includes/SpecialSpecialpages.php b/includes/SpecialSpecialpages.php index f14f4f3d88..78fb177a7e 100644 --- a/includes/SpecialSpecialpages.php +++ b/includes/SpecialSpecialpages.php @@ -41,7 +41,7 @@ function wfSpecialSpecialpages() { * @param $sk skin object ??? */ function wfSpecialSpecialpages_gen($pages,$heading,$sk) { - global $wgLang, $wgOut; + global $wgLang, $wgOut, $wgSortSpecialPages; /** Put them into a sortable array */ $sortedPages = array(); @@ -52,7 +52,9 @@ function wfSpecialSpecialpages_gen($pages,$heading,$sk) { } /** Sort */ - ksort( $sortedPages ); + if ( $wgSortSpecialPages ) { + ksort( $sortedPages ); + } /** Now output the HTML */ $wgOut->addHTML( '

' . wfMsg( $heading ) . "

\n