jenkins-bot has submitted this change and it was merged.

Change subject: Make the "Report problem" POST URL configurable
......................................................................


Make the "Report problem" POST URL configurable

Defaults to "$wgVisualEditorParsoidURL/_bugs/"

Change-Id: I4847d54b0effe433d5d179d91fdf361c249515ad
---
M VisualEditor.hooks.php
M VisualEditor.php
M modules/ve/init/mw/ve.init.mw.Target.js
3 files changed, 9 insertions(+), 3 deletions(-)

Approvals:
  GWicke: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 5d95215..d1ae200 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -59,10 +59,13 @@
         * Adds extra variables to the page config.
         */
        public static function onMakeGlobalVariablesScript( array &$vars, 
OutputPage $out ) {
-               global $wgVisualEditorEnableSectionEditLinks;
+               global $wgVisualEditorEnableSectionEditLinks, 
$wgVisualEditorParsoidProblemReportURL;
                $vars['wgVisualEditor'] = array(
                        'isPageWatched' => $out->getUser()->isWatched( 
$out->getTitle() ),
-                       'enableSectionEditLinks' => 
$wgVisualEditorEnableSectionEditLinks
+                       'enableSectionEditLinks' => 
$wgVisualEditorEnableSectionEditLinks,
+                       'reportProblemURL' => 
$wgVisualEditorParsoidProblemReportURL !== null ?
+                               $wgVisualEditorParsoidProblemReportURL :
+                               "$wgVisualEditorParsoidURL/_bugs/",
                );
 
                return true;
diff --git a/VisualEditor.php b/VisualEditor.php
index 2453d51..f97bce1 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -18,6 +18,9 @@
 $wgVisualEditorParsoidPrefix = 'localhost';
 // Timeout for HTTP requests to Parsoid in seconds
 $wgVisualEditorParsoidTimeout = 100;
+// URL to post reports from the "Report problem" dialog to
+// Defaults to "$wgVisualEditorParsoidURL/_bugs/" if null
+$wgVisualEditorParsoidProblemReportURL = null;
 // Namespaces to enable VisualEditor in
 $wgVisualEditorNamespaces = array( NS_MAIN );
 // Whether to use change tagging for VisualEditor edits
diff --git a/modules/ve/init/mw/ve.init.mw.Target.js 
b/modules/ve/init/mw/ve.init.mw.Target.js
index 05abd6f..d280e68 100644
--- a/modules/ve/init/mw/ve.init.mw.Target.js
+++ b/modules/ve/init/mw/ve.init.mw.Target.js
@@ -592,7 +592,7 @@
                        'wiki': mw.config.get( 'wgDBname' )
                };
        $.post(
-               'http://parsoid.wmflabs.org/_bugs/',
+               mw.config.get( 'wgVisualEditor' ).reportProblemURL,
                { 'data': JSON.stringify( report ) },
                function () {
                        // This space intentionally left blank

-- 
To view, visit https://gerrit.wikimedia.org/r/59644
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4847d54b0effe433d5d179d91fdf361c249515ad
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to