Nothing Special   »   [go: up one dir, main page]

r109695 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109694‎ | r109695 | r109696 >
Date:21:44, 21 January 2012
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.18wmf1 (modified) (history)
  • /branches/wmf/1.18wmf1/includes (modified) (history)
  • /branches/wmf/1.18wmf1/includes/api (modified) (history)
  • /branches/wmf/1.18wmf1/includes/api/ApiParse.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/includes/api/ApiParse.php
@@ -52,6 +52,7 @@
5353 if ( !is_null( $page ) && ( !is_null( $text ) || $title != 'API' ) ) {
5454 $this->dieUsage( 'The page parameter cannot be used together with the text and title parameters', 'params' );
5555 }
 56+
5657 $prop = array_flip( $params['prop'] );
5758
5859 if ( isset( $params['section'] ) ) {
@@ -164,6 +165,9 @@
165166 }
166167 } else { // Not $oldid, $pageid, $page. Hence based on $text
167168
 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+ }
168172 $this->text = $text;
169173 $titleObj = Title::newFromText( $title );
170174 if ( !$titleObj ) {
@@ -383,6 +387,8 @@
384388 * data to generate your own HTML.
385389 */
386390 private function languagesHtml( $languages ) {
 391+ wfDeprecated( __METHOD__, '1.18' );
 392+
387393 global $wgContLang, $wgHideInterlanguageLinks;
388394
389395 if ( $wgHideInterlanguageLinks || count( $languages ) == 0 ) {
@@ -570,6 +576,7 @@
571577 public function getPossibleErrors() {
572578 return array_merge( parent::getPossibleErrors(), array(
573579 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?' ),
574581 array( 'code' => 'missingrev', 'info' => 'There is no revision ID oldid' ),
575582 array( 'code' => 'permissiondenied', 'info' => 'You don\'t have permission to view deleted revisions' ),
576583 array( 'code' => 'missingtitle', 'info' => 'The page you specified doesn\'t exist' ),
Property changes on: branches/wmf/1.18wmf1/includes/api
___________________________________________________________________
Modified: svn:mergeinfo
577584 Merged /trunk/phase3/includes/api:r109693
Property changes on: branches/wmf/1.18wmf1/includes
___________________________________________________________________
Modified: svn:mergeinfo
578585 Merged /trunk/phase3/includes:r109693
Property changes on: branches/wmf/1.18wmf1
___________________________________________________________________
Modified: svn:mergeinfo
579586 Merged /trunk/phase3:r109693

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r109693* (bug 33865) Exception thrown when using API sandbox action=parse...reedy21:36, 21 January 2012

Status & tagging log