From: Brion Vibber Date: Mon, 2 May 2005 12:17:28 +0000 (+0000) Subject: Don't show the restricted pages header if you can't see any. It'll just make X-Git-Tag: 1.5.0alpha1~17 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=d457ab5d782298e91ef12f225683e40daa01289b;p=lhc%2Fweb%2Fwiklou.git 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. --- 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 ) {