Don't show the restricted pages header if you can't see any. It'll just make
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 2 May 2005 12:17:28 +0000 (12:17 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 2 May 2005 12:17:28 +0000 (12:17 +0000)
you feel bad cause you can't see em.

includes/SpecialSpecialpages.php

index 78fb177..265af2f 100644 (file)
@@ -43,6 +43,11 @@ function wfSpecialSpecialpages() {
 function wfSpecialSpecialpages_gen($pages,$heading,$sk) {
        global $wgLang, $wgOut, $wgSortSpecialPages;
 
+       if( count( $pages ) == 0 ) {
+               # Yeah, that was pointless. Thanks for coming.
+               return;
+       }
+       
        /** Put them into a sortable array */
        $sortedPages = array();
        foreach ( $pages as $name => $page ) {