From 83447be90fb6695b4b5fc87c4efe26b84c470b70 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 20 Mar 2005 02:53:23 +0000 Subject: [PATCH] Option to turn special page sorting feature off --- includes/DefaultSettings.php | 4 ++++ includes/SpecialSpecialpages.php | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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