From f422d00970c13705c8f1c60779f8a2ad413f9a00 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Wed, 30 Sep 2015 10:27:04 -0400 Subject: [PATCH] Rename RESTBase1/Parsoid3 `bodyOnly` parameter to `body_only` The old `bodyOnly` name was deprecated on 2015-09-09. Bug: T114185 Change-Id: If1fe919672dec4ca281c7f72bfd769a4bcaa5047 --- includes/libs/virtualrest/ParsoidVirtualRESTService.php | 4 ++-- includes/libs/virtualrest/RestbaseVirtualRESTService.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/libs/virtualrest/ParsoidVirtualRESTService.php b/includes/libs/virtualrest/ParsoidVirtualRESTService.php index 97ddccf5bd..5be4aeab41 100644 --- a/includes/libs/virtualrest/ParsoidVirtualRESTService.php +++ b/includes/libs/virtualrest/ParsoidVirtualRESTService.php @@ -31,7 +31,7 @@ class ParsoidVirtualRESTService extends VirtualRESTService { * * body: array( 'html' => ... ) * * $title and $revision are optional * POST /local/v3/transform/wikitext/to/html/{$title}{/$revision} - * * body: array( 'wikitext' => ... ) or array( 'wikitext' => ..., 'bodyOnly' => true/false ) + * * body: array( 'wikitext' => ... ) or array( 'wikitext' => ..., 'body_only' => true/false ) * * $title is optional * * $revision is optional * @@ -202,7 +202,7 @@ class ParsoidVirtualRESTService extends VirtualRESTService { throw new Exception( "You must set a 'wikitext' body key for this request" ); } if ( isset( $req['body']['body'] ) ) { - $req['body']['bodyOnly'] = $req['body']['body']; + $req['body']['body_only'] = $req['body']['body']; unset( $req['body']['body'] ); } } else { diff --git a/includes/libs/virtualrest/RestbaseVirtualRESTService.php b/includes/libs/virtualrest/RestbaseVirtualRESTService.php index 3a7bc5877c..81442adc42 100644 --- a/includes/libs/virtualrest/RestbaseVirtualRESTService.php +++ b/includes/libs/virtualrest/RestbaseVirtualRESTService.php @@ -29,7 +29,7 @@ class RestbaseVirtualRESTService extends VirtualRESTService { * POST /local/v1/transform/html/to/wikitext{/title}{/revision} * * body: array( 'html' => ... ) * POST /local/v1/transform/wikitext/to/html{/title}{/revision} - * * body: array( 'wikitext' => ... ) or array( 'wikitext' => ..., 'bodyOnly' => true/false ) + * * body: array( 'wikitext' => ... ) or array( 'wikitext' => ..., 'body_only' => true/false ) * * @param array $params Key/value map * - url : RESTBase server URL @@ -193,7 +193,7 @@ class RestbaseVirtualRESTService extends VirtualRESTService { throw new Exception( "You must set a 'wikitext' body key for this request" ); } if ( isset( $req['body']['body'] ) ) { - $req['body']['bodyOnly'] = $req['body']['body']; + $req['body']['body_only'] = $req['body']['body']; unset( $req['body']['body'] ); } } else { @@ -225,7 +225,7 @@ class RestbaseVirtualRESTService extends VirtualRESTService { * * body: array( 'html' => ... ) * * $title and $revision are optional * POST /local/v3/transform/wikitext/to/html/{$title}{/$revision} - * * body: array( 'wikitext' => ... ) or array( 'wikitext' => ..., 'bodyOnly' => true/false ) + * * body: array( 'wikitext' => ... ) or array( 'wikitext' => ..., 'body_only' => true/false ) * * $title is optional * * $revision is optional */ -- 2.20.1