Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -77,6 +77,8 @@ |
78 | 78 | * (bug 27790) add query type for querymodules to action=paraminfo |
79 | 79 | * (bug 28963) add langbacklinks module to api |
80 | 80 | * (bug 27593) API: add error message when sha1/sha1base36 is invalid |
| 81 | +* (bug 28578) API's parse module should not silently override invalid |
| 82 | + title inputs |
81 | 83 | |
82 | 84 | === Languages updated in 1.19 === |
83 | 85 | |
Index: trunk/phase3/includes/api/ApiParse.php |
— | — | @@ -155,7 +155,7 @@ |
156 | 156 | $this->text = $text; |
157 | 157 | $titleObj = Title::newFromText( $title ); |
158 | 158 | if ( !$titleObj ) { |
159 | | - $titleObj = Title::newFromText( 'API' ); |
| 159 | + $this->dieUsageMsg( array( 'invalidtitle', $title ) ); |
160 | 160 | } |
161 | 161 | $wgTitle = $titleObj; |
162 | 162 | |
— | — | @@ -565,6 +565,7 @@ |
566 | 566 | array( 'code' => 'missingtitle', 'info' => 'The page you specified doesn\'t exist' ), |
567 | 567 | array( 'code' => 'nosuchsection', 'info' => 'There is no section sectionnumber in page' ), |
568 | 568 | array( 'nosuchpageid' ), |
| 569 | + array( 'invalidtitle', 'title' ), |
569 | 570 | ) ); |
570 | 571 | } |
571 | 572 | |