X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Flibs%2Fvirtualrest%2FRestbaseVirtualRESTService.php;h=81442adc4218a6e5563a7fe185ee7d5e6eb8d506;hb=47528dcf6a8a40ad0a1ea99fb49113aa9309b460;hp=bc520aa1062d7c46e06118410a7ee92700f41325;hpb=e3a3f2293b4401772508456fc83afc94ea179b31;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/virtualrest/RestbaseVirtualRESTService.php b/includes/libs/virtualrest/RestbaseVirtualRESTService.php index bc520aa106..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 @@ -48,6 +48,7 @@ class RestbaseVirtualRESTService extends VirtualRESTService { public function __construct( array $params ) { // set up defaults and merge them with the given params $mparams = array_merge( array( + 'name' => 'restbase', 'url' => 'http://localhost:7231/', 'domain' => 'localhost', 'timeout' => 100, @@ -192,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 { @@ -224,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 */