* Tweak balancing
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Mon, 14 Apr 2008 07:14:27 +0000 (07:14 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Mon, 14 Apr 2008 07:14:27 +0000 (07:14 +0000)
includes/SpecialSpecialpages.php

index 90ff0ed..4a8007f 100644 (file)
@@ -66,7 +66,7 @@ function wfSpecialSpecialpages_gen($pages,$heading,$sk) {
        $wgOut->addHTML( '<h2>' . wfMsgHtml( $heading ) . "</h2>\n" );
        foreach ( $groups as $group => $sortedPages ) {
                $middle = ceil( count($sortedPages)/2 );
-               $max = count($sortedPages) - 1;
+               $total = count($sortedPages);
                $count = 0;
                
                $wgOut->addHTML( "<h4 class='mw-specialpagesgroup'>".wfMsgHtml("specialpages-group-$group")."</h4>\n" );
@@ -78,7 +78,7 @@ function wfSpecialSpecialpages_gen($pages,$heading,$sk) {
                        
                        # Slit up the larger groups
                        $count++;
-                       if( $max > 3 && $count == $middle && $count < $max ) {
+                       if( $total > 3 && $count == $middle ) {
                                $wgOut->addHTML( "</ul></td><td width='10%'></td><td width='30%' valign='top'><ul>" );
                        }
                }