Fix breakage of child class in Special:Makesysop, plus a couple of cosmetic changes.
authorTim Starling <tstarling@users.mediawiki.org>
Mon, 25 Dec 2006 10:49:57 +0000 (10:49 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Mon, 25 Dec 2006 10:49:57 +0000 (10:49 +0000)
includes/SpecialUserrights.php

index 2354fcc..99abd7a 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @package MediaWiki
  * @subpackage Special pages
- * @todo This code is fucking disgusting and needs a total rewrite
+ * @todo This code is disgusting and needs a total rewrite
  */
 
 /** */
@@ -122,15 +122,14 @@ class UserrightsForm extends HTMLForm {
         */
        function switchForm() {
                global $wgOut, $wgRequest;
-               $self = SpecialPage::getTitleFor( 'Userrights' );
                $username = $wgRequest->getText( 'user-editname' );
-               $form  = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl(), 'name' => 'uluser' ) );
+               $form  = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->action, 'name' => 'uluser' ) );
                $form .= '<fieldset><legend>' . wfMsgHtml( 'userrights-lookup-user' ) . '</legend>';
                $form .= '<p>' . Xml::inputLabel( wfMsg( 'userrights-user-editname' ), 'user-editname', 'username', 30, $username ) . '</p>';
                $form .= '<p>' . Xml::submitButton( wfMsg( 'editusergroup' ), array( 'name' => 'ssearchuser' ) ) . '</p>';
                $form .= '</fieldset>';
                $form .= '</form>';
-               $wgOut->addHtml( $form );
+               $wgOut->addHTML( $form );
        }
 
        /**