Merge "Fix Memcached key decode"
[lhc/web/wiklou.git] / includes / libs / virtualrest / ParsoidVirtualRESTService.php
index 4c96e29..97ddccf 100644 (file)
@@ -34,7 +34,7 @@ class ParsoidVirtualRESTService extends VirtualRESTService {
         *   * body: array( 'wikitext' => ... ) or array( 'wikitext' => ..., 'bodyOnly' => 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',
@@ -91,7 +92,7 @@ class ParsoidVirtualRESTService extends VirtualRESTService {
                                // $revision (optional)
                        ) = $parts;
 
-                       if ( $this->params['restbaseCompat'] ) {
+                       if ( isset( $this->params['restbaseCompat'] ) && $this->params['restbaseCompat'] ) {
                                if ( $version !== 'v1' ) {
                                        throw new Exception( "Only RESTBase v1 API is supported." );
                                }