From d457ab5d782298e91ef12f225683e40daa01289b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 2 May 2005 12:17:28 +0000 Subject: [PATCH] Don't show the restricted pages header if you can't see any. It'll just make you feel bad cause you can't see em. --- includes/SpecialSpecialpages.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/SpecialSpecialpages.php b/includes/SpecialSpecialpages.php index 78fb177a7e..265af2f6bf 100644 --- a/includes/SpecialSpecialpages.php +++ b/includes/SpecialSpecialpages.php @@ -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 ) { -- 2.20.1