aboutsummaryrefslogtreecommitdiffstats
path: root/data/rhlib
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-04-29 01:22:18 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-06-05 14:51:40 +0200
commit272ab432ddc4562237c7235f8e0ab8a11bad3d3d (patch)
treefbaddbe065bb8c4a60e820894c95c2ab7d8e1a2b /data/rhlib
parent7b6eefcd506ec03e1db422ca6e1f4f1bb8420d1c (diff)
downloadbugzilla-triage-272ab432ddc4562237c7235f8e0ab8a11bad3d3d.tar.gz
All XML-RPC calls are rewritten as JSON-RPC ones.
* also MakeJSONRPCall is a functional call now * reorganization for dealing with the history.
Diffstat (limited to 'data/rhlib')
-rw-r--r--data/rhlib/fixingAttMIME.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/data/rhlib/fixingAttMIME.js b/data/rhlib/fixingAttMIME.js
index 365cfae..c2adde4 100644
--- a/data/rhlib/fixingAttMIME.js
+++ b/data/rhlib/fixingAttMIME.js
@@ -45,8 +45,6 @@ function XMLRPCcallback() {
*
*/
function fixAttachById(id, XMLRPCURL, type, email) {
- var params = [];
-
if (type === undefined) {
type = "text/plain";
}
@@ -57,15 +55,14 @@ function fixAttachById(id, XMLRPCURL, type, email) {
// https://bugzilla.redhat.com/\
// docs/en/html/api/extensions/compat_xmlrpc/code/webservice.html
// test on https://bugzilla.redhat.com/show_bug.cgi?id=485145
- params.push({
+ var params = {
'attach_id' : id,
'mime_type' : type,
'nomail' : !email
- });
+ };
- self.postMessage(new Message("MakeXMLRPCall", {
- url : XMLRPCURL,
- login : getLogin(),
+ self.postMessage(new Message("MakeJSONRPCall", {
+ url : XMLRPCURL.replace("xmlrpc.cgi","jsonrpc.cgi"),
method : "bugzilla.updateAttachMimeType",
params : params,
callRPC : "FixAttachmentMIMECallback"