Index: branches/wmf/1.18wmf1/includes/api/ApiParse.php |
— | — | @@ -52,6 +52,7 @@ |
53 | 53 | if ( !is_null( $page ) && ( !is_null( $text ) || $title != 'API' ) ) { |
54 | 54 | $this->dieUsage( 'The page parameter cannot be used together with the text and title parameters', 'params' ); |
55 | 55 | } |
| 56 | + |
56 | 57 | $prop = array_flip( $params['prop'] ); |
57 | 58 | |
58 | 59 | if ( isset( $params['section'] ) ) { |
— | — | @@ -164,6 +165,9 @@ |
165 | 166 | } |
166 | 167 | } else { // Not $oldid, $pageid, $page. Hence based on $text |
167 | 168 | |
| 169 | + if ( is_null( $text ) ) { |
| 170 | + $this->dieUsage( 'The text parameter should be passed with the title parameter. Should you be using the "page" parameter instead?', 'params' ); |
| 171 | + } |
168 | 172 | $this->text = $text; |
169 | 173 | $titleObj = Title::newFromText( $title ); |
170 | 174 | if ( !$titleObj ) { |
— | — | @@ -383,6 +387,8 @@ |
384 | 388 | * data to generate your own HTML. |
385 | 389 | */ |
386 | 390 | private function languagesHtml( $languages ) { |
| 391 | + wfDeprecated( __METHOD__, '1.18' ); |
| 392 | + |
387 | 393 | global $wgContLang, $wgHideInterlanguageLinks; |
388 | 394 | |
389 | 395 | if ( $wgHideInterlanguageLinks || count( $languages ) == 0 ) { |
— | — | @@ -570,6 +576,7 @@ |
571 | 577 | public function getPossibleErrors() { |
572 | 578 | return array_merge( parent::getPossibleErrors(), array( |
573 | 579 | array( 'code' => 'params', 'info' => 'The page parameter cannot be used together with the text and title parameters' ), |
| 580 | + array( 'code' => 'params', 'info' => 'The text parameter should be passed with the title parameter. Should you be using the "page" parameter instead?' ), |
574 | 581 | array( 'code' => 'missingrev', 'info' => 'There is no revision ID oldid' ), |
575 | 582 | array( 'code' => 'permissiondenied', 'info' => 'You don\'t have permission to view deleted revisions' ), |
576 | 583 | array( 'code' => 'missingtitle', 'info' => 'The page you specified doesn\'t exist' ), |
Property changes on: branches/wmf/1.18wmf1/includes/api |
___________________________________________________________________ |
Modified: svn:mergeinfo |
577 | 584 | Merged /trunk/phase3/includes/api:r109693 |
Property changes on: branches/wmf/1.18wmf1/includes |
___________________________________________________________________ |
Modified: svn:mergeinfo |
578 | 585 | Merged /trunk/phase3/includes:r109693 |
Property changes on: branches/wmf/1.18wmf1 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
579 | 586 | Merged /trunk/phase3:r109693 |