Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -44,6 +44,7 @@ |
45 | 45 | * (bug 29685) do not output NULL parentid with list=deletedrevs&drprop=parentid. |
46 | 46 | * siprop=interwikimap and siprop=languages can use silanguagecode to have |
47 | 47 | a best effort language name translation. Use CLDR extension for best result. |
| 48 | +* (bug 30230) action=expandtemplates should not silently override invalid title inputs |
48 | 49 | |
49 | 50 | === Languages updated in 1.19 === |
50 | 51 | |
Index: trunk/phase3/includes/api/ApiExpandTemplates.php |
— | — | @@ -52,7 +52,7 @@ |
53 | 53 | // Create title for parser |
54 | 54 | $title_obj = Title::newFromText( $params['title'] ); |
55 | 55 | if ( !$title_obj ) { |
56 | | - $title_obj = Title::newFromText( 'API' ); // default |
| 56 | + $this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) ); |
57 | 57 | } |
58 | 58 | |
59 | 59 | $result = $this->getResult(); |
— | — | @@ -109,6 +109,12 @@ |
110 | 110 | return 'Expands all templates in wikitext'; |
111 | 111 | } |
112 | 112 | |
| 113 | + public function getPossibleErrors() { |
| 114 | + return array_merge( parent::getPossibleErrors(), array( |
| 115 | + array( 'invalidtitle', 'title' ), |
| 116 | + ) ); |
| 117 | + } |
| 118 | + |
113 | 119 | protected function getExamples() { |
114 | 120 | return array( |
115 | 121 | 'api.php?action=expandtemplates&text={{Project:Sandbox}}' |