X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2Fvirtualrest%2FParsoidVirtualRESTService.php;h=5be4aeab41ed584eb53ec05e235e56360952edd8;hb=e62c56ee6d999a9a6769d7f77037f30d166377ef;hp=2a179be6e73b989572da17b3d4910d146c7ddd84;hpb=cdc391b16db021e71e6ca9c00f2b7d341c1ca5f8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/virtualrest/ParsoidVirtualRESTService.php b/includes/libs/virtualrest/ParsoidVirtualRESTService.php index 2a179be6e7..5be4aeab41 100644 --- a/includes/libs/virtualrest/ParsoidVirtualRESTService.php +++ b/includes/libs/virtualrest/ParsoidVirtualRESTService.php @@ -31,10 +31,10 @@ 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 - * + * * There are also deprecated "v1" requests; see onParsoid1Request * for details. * @param array $params Key/value map @@ -54,6 +54,7 @@ class ParsoidVirtualRESTService extends VirtualRESTService { } // set up defaults and merge them with the given params $mparams = array_merge( array( + 'name' => 'parsoid', 'url' => 'http://localhost:8000/', 'prefix' => 'localhost', 'domain' => 'localhost', @@ -201,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 {