r14142 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14141‎ | r14142 | r14143 >
Date:15:22, 9 May 2006
Author:robchurch
Status:old
Tags:
Comment:
(reopened bug 5284) Handle cases like Special:Mypage/monobook.js&action=edit
Modified paths:
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialPage.php
@@ -276,16 +276,18 @@
277277 } else {
278278 $redir = SpecialPage::getRedirect( $name );
279279 if ( isset( $redir ) ) {
 280+ if( $par )
 281+ $redir = Title::makeTitle( $redir->getNamespace(), $redir->getText() . '/' . $par );
280282 $params = SpecialPage::getRedirectParams( $name );
281283 if( $params ) {
282284 $url = $redir->getFullUrl( $params );
283 - } elseif( $par ) {
284 - $url = $redir->getFullUrl() . '/' . $par;
285285 } else {
286286 $url = $redir->getFullUrl();
287287 }
288288 $wgOut->redirect( $url );
289289 $retVal = $redir;
 290+ $wgOut->redirect( $url );
 291+ $retVal = $redir;
290292 } else {
291293 $wgOut->setArticleRelated( false );
292294 $wgOut->setRobotpolicy( 'noindex,follow' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r13956(bug 5284) Special redirect pages should remember parametersrobchurch02:27, 30 April 2006

Status & tagging log