r110836 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110835‎ | r110836 | r110837 >
Date:11:03, 7 February 2012
Author:johnduhart
Status:ok (Comments)
Tags:core, todo 
Comment:
Fixes Bug 34243 - [Regression] Can't navigate from Special:ListUsers/sysop to other groups
Followup r97658
Modified paths:
  • /trunk/phase3/includes/specials/SpecialListusers.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialListusers.php
@@ -185,12 +185,13 @@
186186
187187 function getPageHeader( ) {
188188 global $wgScript;
189 - $self = $this->getTitle();
 189+ // @todo Add a PrefixedBaseDBKey
 190+ list( $self ) = explode( '/', $this->getTitle()->getPrefixedDBkey() );
190191
191192 # Form tag
192193 $out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listusers-form' ) ) .
193194 Xml::fieldset( wfMsg( 'listusers' ) ) .
194 - Html::hidden( 'title', $self->getPrefixedDbKey() );
 195+ Html::hidden( 'title', $self );
195196
196197 # Username field
197198 $out .= Xml::label( wfMsg( 'listusersfrom' ), 'offset' ) . ' ' .

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97658* Made IndexPager extend ContextSource...ialex20:00, 20 September 2011

Comments

#Comment by Aaron Schulz (talk | contribs)   19:43, 7 February 2012

I'm pretty sure there is a better way to do this using SpecialPage functions.

#Comment by Catrope (talk | contribs)   20:18, 8 February 2012

Are you afraid that getTitle() will produce something like Special:Listusers/foo ? Upon reading the code for SpecialPage::getTitle(), I don't see how that could happen.

#Comment by IAlex (talk | contribs)   22:57, 8 February 2012

That code is in a subclass of Pager, not SpecialPage.

Status & tagging log