(bug 42403) Add Parsoid prefix to POST requests too.

This is a port of Mark's https://gerrit.wikimedia.org/r/#/c/31348

Change-Id: I3a57992fdbeffad1df1d97239e98dbec52fdd5cb
This commit is contained in:
Catrope 2012-11-26 17:39:44 -08:00
parent 1ba75b7ea9
commit ae0c4e6988

View file

@ -28,9 +28,11 @@ class ApiVisualEditor extends ApiBase {
} }
protected function postHTML( $title, $html ) { protected function postHTML( $title, $html ) {
global $wgVisualEditorParsoidURL, $wgVisualEditorParsoidTimeout; global $wgVisualEditorParsoidURL, $wgVisualEditorParsoidPrefix,
$wgVisualEditorParsoidTimeout;
return Http::post( return Http::post(
$wgVisualEditorParsoidURL . '/' . urlencode( $title->getPrefixedDBkey() ), $wgVisualEditorParsoidURL . '/' . $wgVisualEditorParsoidPrefix .
'/' . urlencode( $title->getPrefixedDBkey() ),
array( array(
'postData' => array( 'content' => $html ), 'postData' => array( 'content' => $html ),
'timeout' => $wgVisualEditorParsoidTimeout 'timeout' => $wgVisualEditorParsoidTimeout