MaxSem has uploaded a new change for review.
https://gerrit.wikimedia.org/r/103723
Change subject: Don't use bogus nonefm format
......................................................................
Don't use bogus nonefm format
Bug: 57504
Change-Id: I3ecd8a0aea6908f6401430e889b1b9904cbbe672
---
M resources/main.js
1 file changed, 7 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ApiSandbox
refs/changes/23/103723/1
diff --git a/resources/main.js b/resources/main.js
index ee6555b..bbaae1f 100644
--- a/resources/main.js
+++ b/resources/main.js
@@ -550,7 +550,7 @@
} );
$form.submit( function ( e ) {
- var url, params, mustBePosted, historyEntry;
+ var url, params, mustBePosted, historyEntry, formatStr;
// Prevent browser from submitting the form
// and reloading the page to the action-url.
@@ -568,7 +568,8 @@
url += '&' + $query.val();
params += queryRequest.getRequestData();
}
- url += '&format=' + $format.val();
+ formatStr = $format.val();
+ url += '&format=' + formatStr;
params += genericRequest.getRequestData();
if ( $( '#param-generator' ).length && $(
'#param-generator' ).val() ) {
@@ -594,7 +595,10 @@
$requestUrl.val( url + params );
$postRow.hide();
}
- url = url.replace( /(&format=[^&]+)/, '$1fm' );
+ // There is no nonefm format
+ if ( formatStr != 'none' ) {
+ url = url.replace( /(&format=[^&]+)/, '$1fm' );
+ }
runQuery( { url: url, params: params,
type: mustBePosted ? 'POST' : 'GET' } );
} );
--
To view, visit https://gerrit.wikimedia.org/r/103723
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ecd8a0aea6908f6401430e889b1b9904cbbe672
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApiSandbox
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits