| Index: trunk/phase3/includes/api/ApiParse.php |
| — | — | @@ -47,6 +47,7 @@ |
| 48 | 48 | if ( !is_null( $page ) && ( !is_null( $text ) || $title != 'API' ) ) { |
| 49 | 49 | $this->dieUsage( 'The page parameter cannot be used together with the text and title parameters', 'params' ); |
| 50 | 50 | } |
| | 51 | + |
| 51 | 52 | $prop = array_flip( $params['prop'] ); |
| 52 | 53 | |
| 53 | 54 | if ( isset( $params['section'] ) ) { |
| — | — | @@ -158,6 +159,9 @@ |
| 159 | 160 | } |
| 160 | 161 | } else { // Not $oldid, $pageid, $page. Hence based on $text |
| 161 | 162 | |
| | 163 | + if ( is_null( $text ) ) { |
| | 164 | + $this->dieUsage( 'The text parameter should be passed with the title parameter. Should you be using the "page" parameter instead?', 'params' ); |
| | 165 | + } |
| 162 | 166 | $this->text = $text; |
| 163 | 167 | $titleObj = Title::newFromText( $title ); |
| 164 | 168 | if ( !$titleObj ) { |
| — | — | @@ -383,7 +387,7 @@ |
| 384 | 388 | */ |
| 385 | 389 | private function languagesHtml( $languages ) { |
| 386 | 390 | wfDeprecated( __METHOD__, '1.18' ); |
| 387 | | - |
| | 391 | + |
| 388 | 392 | global $wgContLang, $wgHideInterlanguageLinks; |
| 389 | 393 | |
| 390 | 394 | if ( $wgHideInterlanguageLinks || count( $languages ) == 0 ) { |
| — | — | @@ -571,6 +575,7 @@ |
| 572 | 576 | public function getPossibleErrors() { |
| 573 | 577 | return array_merge( parent::getPossibleErrors(), array( |
| 574 | 578 | array( 'code' => 'params', 'info' => 'The page parameter cannot be used together with the text and title parameters' ), |
| | 579 | + array( 'code' => 'params', 'info' => 'The text parameter should be passed with the title parameter. Should you be using the "page" parameter instead?' ), |
| 575 | 580 | array( 'code' => 'missingrev', 'info' => 'There is no revision ID oldid' ), |
| 576 | 581 | array( 'code' => 'permissiondenied', 'info' => 'You don\'t have permission to view deleted revisions' ), |
| 577 | 582 | array( 'code' => 'missingtitle', 'info' => 'The page you specified doesn\'t exist' ), |