From a58285fd06c8113c45377c655dd43cef6337e815 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 11 Jan 2007 19:06:07 +0000 Subject: Aktualisierung auf MediaWiki 1.9.0 --- includes/SpecialUserrights.php | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) (limited to 'includes/SpecialUserrights.php') diff --git a/includes/SpecialUserrights.php b/includes/SpecialUserrights.php index b17cc4aa..99abd7a7 100644 --- a/includes/SpecialUserrights.php +++ b/includes/SpecialUserrights.php @@ -1,11 +1,11 @@ mRequest =& $request; $this->mName = 'userrights'; - $titleObj = Title::makeTitle( NS_SPECIAL, 'Userrights' ); + $titleObj = SpecialPage::getTitleFor( 'Userrights' ); $this->action = $titleObj->escapeLocalURL(); } @@ -89,7 +89,6 @@ class UserrightsForm extends HTMLForm { $oldGroups = $u->getGroups(); $newGroups = $oldGroups; - $logcomment = ' '; // remove then add groups if(isset($removegroup)) { $newGroups = array_diff($newGroups, $removegroup); @@ -119,22 +118,18 @@ class UserrightsForm extends HTMLForm { } /** - * The entry form - * It allows a user to look for a username and edit its groups membership + * Output a form to allow searching for a user */ function switchForm() { - global $wgOut; - - // user selection - $wgOut->addHTML( "
action\" method=\"post\">\n" ); - $wgOut->addHTML( $this->fieldset( 'lookup-user', - $this->textbox( 'user-editname' ) . - wfElement( 'input', array( - 'type' => 'submit', - 'name' => 'ssearchuser', - 'value' => wfMsg( 'editusergroup' ) ) ) - )); - $wgOut->addHTML( "
\n" ); + global $wgOut, $wgRequest; + $username = $wgRequest->getText( 'user-editname' ); + $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->action, 'name' => 'uluser' ) ); + $form .= '
' . wfMsgHtml( 'userrights-lookup-user' ) . ''; + $form .= '

' . Xml::inputLabel( wfMsg( 'userrights-user-editname' ), 'user-editname', 'username', 30, $username ) . '

'; + $form .= '

' . Xml::submitButton( wfMsg( 'editusergroup' ), array( 'name' => 'ssearchuser' ) ) . '

'; + $form .= '
'; + $form .= ''; + $wgOut->addHTML( $form ); } /** -- cgit v1.2.3-54-g00ecf