Rename RESTBase1/Parsoid3 `bodyOnly` parameter to `body_only`
authorC. Scott Ananian <cscott@cscott.net>
Wed, 30 Sep 2015 14:27:04 +0000 (10:27 -0400)
committerC. Scott Ananian <cscott@cscott.net>
Wed, 30 Sep 2015 14:27:04 +0000 (10:27 -0400)
The old `bodyOnly` name was deprecated on 2015-09-09.

Bug: T114185
Change-Id: If1fe919672dec4ca281c7f72bfd769a4bcaa5047

includes/libs/virtualrest/ParsoidVirtualRESTService.php
includes/libs/virtualrest/RestbaseVirtualRESTService.php

index 97ddccf..5be4aea 100644 (file)
@@ -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 {
index 3a7bc58..81442ad 100644 (file)
@@ -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
         */