r98235 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98234‎ | r98235 | r98236 >
Date:18:55, 27 September 2011
Author:aaron
Status:ok (Comments)
Tags:
Comment:
(bug 31088) [Regression] "Create account/log in" should use the current title and query in returnto
Modified paths:
  • /trunk/phase3/includes/SpecialPageFactory.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialPageFactory.php
@@ -455,7 +455,7 @@
456456 wfProfileOut( __METHOD__ );
457457 return $title;
458458 } else {
459 - $context->setTitle( $page->getTitle() );
 459+ $context->setTitle( $page->getTitle( $par ) );
460460 }
461461
462462 } elseif ( !$page->isIncludable() ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r98737[RL2] Fix special page detection....krinkle02:53, 3 October 2011
r990941.18wmf1: MFT r98235, r98411, r98665, r98676, r98678, r98773, r98812, r99082,...catrope13:01, 6 October 2011
r99980REL1_18 MFT r93726, r94199, r96437, r96438, r696579, r98235, r98734reedy22:13, 16 October 2011

Comments

#Comment by Krinkle (talk | contribs)   19:11, 27 September 2011

This doesn't only change it for the returnto / returntoquery but for the entire context. We need to make sure that nothing assumes getTitle() on a SpecialPage is without par.

Although I haven't confirmed it yet, one of the things happening in RL2:

$title->equals( SpecialPage::getTitleFor( 'Gadgets' ) )

How does that behave if the title is Special:Gadgets/Foo ?

#Comment by Aaron Schulz (talk | contribs)   01:40, 28 September 2011

If you just want to check if this is any Gadgets page (including with or without a subpage), why not use $title->isSpecial( 'Gadgets' ) or the like?

Maybe there is a more specific fix just for this link. Though I don't see why SpecialPageFactory should be clobbering the title with $context->setTitle().

#Comment by Aaron Schulz (talk | contribs)   04:10, 28 September 2011

Maybe the idea was to have the subpage count as just a parameter to the special page, and the "real" title is the special page without the parameter.

Status & tagging log