If for some weird reason user-reason is not given a value, make MySQL happy by defaul...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 10 May 2007 01:53:07 +0000 (01:53 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 10 May 2007 01:53:07 +0000 (01:53 +0000)
includes/SpecialUserrights.php

index d12a9cc..0e61622 100644 (file)
@@ -74,7 +74,7 @@ class UserrightsForm extends HTMLForm {
         * @param string $reason Reason for group change
         *
         */
-       function saveUserGroups( $username, $removegroup, $addgroup, $reason ) {
+       function saveUserGroups( $username, $removegroup, $addgroup, $reason = '' ) {
                global $wgOut;
                $u = User::newFromName($username);
 
@@ -108,7 +108,7 @@ class UserrightsForm extends HTMLForm {
                wfDebug( 'oldGroups: ' . print_r( $oldGroups, true ) );
                wfDebug( 'newGroups: ' . print_r( $newGroups, true ) );
 
-               wfRunHooks( 'UserRights', array( &$u, $addgroup, $removegroup ) );      
+               wfRunHooks( 'UserRights', array( &$u, $addgroup, $removegroup ) );
                $log = new LogPage( 'rights' );
                $log->addEntry( 'rights', Title::makeTitle( NS_USER, $u->getName() ), $reason, array( $this->makeGroupNameList( $oldGroups ),
                        $this->makeGroupNameList( $newGroups ) ) );