* Fix regression in 37317, random content going into logs
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Thu, 10 Jul 2008 07:09:46 +0000 (07:09 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Thu, 10 Jul 2008 07:09:46 +0000 (07:09 +0000)
includes/specials/SpecialUserrights.php

index 28c9ca2..7fa21bc 100644 (file)
@@ -197,8 +197,8 @@ class UserrightsPage extends SpecialPage {
                        $user->getUserPage(),
                        $wgRequest->getText( 'user-reason' ),
                        array(
-                               $this->makeGroupNameList( $oldGroups ),
-                               $this->makeGroupNameList( $newGroups )
+                               $this->makeGroupNameListForLog( $oldGroups ),
+                               $this->makeGroupNameListForLog( $newGroups )
                        )
                );
        }
@@ -295,6 +295,14 @@ class UserrightsPage extends SpecialPage {
                }
        }
 
+       function makeGroupNameListForLog( $ids ) {
+               if( empty( $ids ) ) {
+                       return '';
+               } else {
+                       return $this->makeGroupNameList( $ids );
+               }
+       }
+
        /**
         * Output a form to allow searching for a user
         */