From 8bdfe47406c7ae679b1387aa53583847802198c0 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Thu, 24 Apr 2008 06:56:34 +0000 Subject: [PATCH] Split off getAllGroups(), to facilitate subclassing for weird circumstances (like, for example, writing a global version of it to go with CentralAuth) --- includes/SpecialUserrights.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/includes/SpecialUserrights.php b/includes/SpecialUserrights.php index 303f6bd4f8..a1b9b41cdd 100644 --- a/includes/SpecialUserrights.php +++ b/includes/SpecialUserrights.php @@ -290,7 +290,7 @@ class UserrightsPage extends SpecialPage { global $wgOut, $wgScript; $wgOut->addHTML( Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1' ) ) . - Xml::hidden( 'title', 'Special:Userrights' ) . + Xml::hidden( 'title', $this->getTitle() ) . Xml::openElement( 'fieldset' ) . Xml::element( 'legend', array(), wfMsg( 'userrights-lookup-user' ) ) . Xml::inputLabel( wfMsg( 'userrights-user-editname' ), 'user', 'username', 30, $this->mTarget ) . ' ' . @@ -388,6 +388,14 @@ class UserrightsPage extends SpecialPage { $cache[$group] = User::makeGroupLinkHtml( $group, User::getGroupName( $group ) ); return $cache[$group]; } + + /** + * Returns an array of all groups that may be edited + * @return array Array of groups that may be edited. + */ + private function getAllGroups() { + return User::getAllGroups(); + } /** * Adds the element */ private function groupCheckboxes( $usergroups ) { - $allgroups = User::getAllGroups(); + $allgroups = self::getAllGroups(); $ret = ''; $column = 1; -- 2.20.1