r79536 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79535‎ | r79536 | r79537 >
Date:23:20, 3 January 2011
Author:vyznev
Status:ok
Tags:
Comment:
make action=parse return a missingtitle error if the page param refers to a missing (rather than just invalid) title
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiParse.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiParse.php
@@ -136,7 +136,7 @@
137137 $to = $page;
138138 }
139139 $titleObj = Title::newFromText( $to );
140 - if ( !$titleObj ) {
 140+ if ( !$titleObj || !$titleObj->exists() ) {
141141 $this->dieUsage( "The page you specified doesn't exist", 'missingtitle' );
142142 }
143143 }
Index: trunk/phase3/RELEASE-NOTES
@@ -65,6 +65,7 @@
6666 * Add a realname uiprop option to query=userinfo so a user's realname can be extracted
6767 * Add a &watchuser option to ApiBlock
6868 * (bug 26541) Generator-ise ApiQueryRecentChanges
 69+* action=parse now correctly returns an error for nonexistent pages
6970
7071 === Languages updated in 1.18 ===
7172

Follow-up revisions

RevisionCommit summaryAuthorDate
r814071.17: MFT r79454, r79455, r79456, r79536, r79727, r79733, r79773, r79774, r80...catrope19:18, 2 February 2011

Status & tagging log