Option to turn special page sorting feature off
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 20 Mar 2005 02:53:23 +0000 (02:53 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 20 Mar 2005 02:53:23 +0000 (02:53 +0000)
includes/DefaultSettings.php
includes/SpecialSpecialpages.php

index 9530066..7245ef5 100644 (file)
@@ -1183,6 +1183,10 @@ $wgNoFollowLinks = true;
  */
 $wgMinimalPasswordLength = 0;
 
+/** Whether or not to sort special pages in Special:Specialpages */
+
+$wgSortSpecialPages = true;
+
 } else {
        die();
 }
index f14f4f3..78fb177 100644 (file)
@@ -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( '<h2>' . wfMsg( $heading ) . "</h2>\n<ul>" );