Hello,

I've been working on setting up the Collection extension and a render server
here, and I had to patch the Collection.body.php file of the Collection
extension to fit my need.
Good job by the way, had some trouble setting it up but managed to do it in
the end.

My need was to have a base_url for the render server that is different from
the $wgServerName of the wiki, so that the render server access the wiki
from a different hostname and then bypass SSO authentication.
On command line, no problem with mw-render I just have to give the correct
"--config"  parameter but the Collection plugin uses the ServerName as the
parameter.

For that I added a $wgBaseUrlRenderServer variable in LocalSettings.php and
added the following code in the renderCollection function, line 976 :

                if ( !$wgBaseUrlRenderServer ) {
                        $base_url = $wgServer;
                }
                else {
                        $base_url = $wgBaseUrlRenderServer;
                }

                $response = self::mwServeCommand( 'render', array(
                        'metabook' => $this->buildJSONCollection(
$collection ),
                        'base_url' => $base_url . $wgScriptPath,
in place of

               $response = self::mwServeCommand( 'render', array(
                        'metabook' => $this->buildJSONCollection(
$collection ),
                        'base_url' => $wgServer . $wgScriptPath,


so that it doesn't affect the current behaviour if the
$wgBaseUrlRenderServer isn't set.

Does that seem the right way to do it ?

If it does is there a way my path can make it to the official code ? That
would keep me from adding this path on each update.

Best regards,
Guillaume

-- 
You received this message because you are subscribed to the Google Groups 
"mwlib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/mwlib?hl=en.

Reply via email to