Remove 8-group limit for putting Userrights options in columns - so they will always...
authorAndrew Garrett <werdna@users.mediawiki.org>
Wed, 2 Apr 2008 00:27:30 +0000 (00:27 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Wed, 2 Apr 2008 00:27:30 +0000 (00:27 +0000)
includes/SpecialUserrights.php

index 9842ae2..1118365 100644 (file)
@@ -402,13 +402,9 @@ class UserrightsPage extends SpecialPage {
                $allgroups = User::getAllGroups();
                $ret = '';
                
-               if (count($allgroups)>8) {
-                       $column = 1;
-                       $settable_col = '';
-                       $unsettable_col = '';
-               } else {
-                       $column = 0;
-               }
+               $column = 1;
+               $settable_col = '';
+               $unsettable_col = '';
                
                foreach ($allgroups as $group) {
                        $set = in_array( $group, $usergroups );
@@ -421,14 +417,10 @@ class UserrightsPage extends SpecialPage {
                                        "wpGroup-$group", $set, $attr );
                        $checkbox = $disabled ? "<span class='mw-userrights-disabled'>$checkbox</span>" : $checkbox;
                                
-                       if ($column) {
-                               if ($disabled) {
-                                       $unsettable_col .= "$checkbox<br/>\n";
-                               } else {
-                                       $settable_col .= "$checkbox<br/>\n";
-                               }
+                       if ($disabled) {
+                               $unsettable_col .= "$checkbox<br/>\n";
                        } else {
-                               $ret .= " $checkbox ";
+                               $settable_col .= "$checkbox<br/>\n";
                        }
                }