r101478 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101477‎ | r101478 | r101479 >
Date:14:21, 1 November 2011
Author:hashar
Status:ok (Comments)
Tags:
Comment:
bug 32086 Special:Permanentlink require a parameter

When Special:Permanentlink was not given any parameter it assumed oldid=0
and redirected to the Main_Page. This make it throw an error page instead.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.18 (modified) (history)
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.18
@@ -476,6 +476,8 @@
477477 * (bug 31674) Can't edit watchlist if it contains special pages
478478 * (bug 32100) Installer complains about Suhosin GET limit even if it is
479479 already set above 1024 bytes
 480+* (bug 32086) Special:PermanentLink now show an error message when no subpage
 481+ was specified.
480482
481483 === API changes in 1.18 ===
482484 * BREAKING CHANGE: action=watch now requires POST and token.
Index: trunk/phase3/includes/SpecialPage.php
@@ -1080,6 +1080,10 @@
10811081
10821082 function getRedirect( $subpage ) {
10831083 $subpage = intval( $subpage );
 1084+ if( $subpage === 0 ) {
 1085+ # throw an error page when no subpage was given
 1086+ throw new ErrorPageError( 'nopagetitle', 'nopagetext' );
 1087+ }
10841088 $this->mAddedRedirectParams['oldid'] = $subpage;
10851089 return true;
10861090 }

Sign-offs

UserFlagDate
Nikerabbitinspected15:06, 1 November 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r103661remove bug 32086 release note...hashar11:41, 19 November 2011
r103662bug 32086 get fixed in 1.18 not 1.18...hashar11:42, 19 November 2011

Comments

#Comment by Duplicatebug (talk | contribs)   19:22, 3 November 2011

Please do not reuse the messages 'nopagetext'/'nopagetitle', because many languages have translation which refer to "move a page" (see the /qqq-Message). Maybe make them all FUZZY or create a new one. Thanks.

Status & tagging log