From 5efc52cf5cec2b9b5f75351da8e473c2f90266b5 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Thu, 1 Sep 2011 10:29:28 +0200 Subject: Eliminating MakeJSONRPC calls and fixing multiple logins. Fixes #113. --- data/rhlib/fixingAttMIME.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'data/rhlib/fixingAttMIME.js') diff --git a/data/rhlib/fixingAttMIME.js b/data/rhlib/fixingAttMIME.js index f61ddbd..220b7ad 100644 --- a/data/rhlib/fixingAttMIME.js +++ b/data/rhlib/fixingAttMIME.js @@ -44,7 +44,7 @@ function XMLRPCcallback() { * this change }; * */ -function fixAttachById(id, XMLRPCURL, type, email) { +function fixAttachById(id, type, email) { if (type === undefined) { type = "text/plain"; } @@ -61,13 +61,7 @@ function fixAttachById(id, XMLRPCURL, type, email) { 'nomail' : !email }; - self.postMessage(new Message("MakeJSONRPCall", { - url : XMLRPCURL.replace("xmlrpc.cgi", "jsonrpc.cgi"), - method : "bugzilla.updateAttachMimeType", - login : getLogin(), - params : params, - callRPC : "FixAttachmentMIMECallback" - })); + makeJSONRPCCall("bugzilla.updateAttachMimeType", params, XMLRPCcallback); reqCounter++; } @@ -78,11 +72,9 @@ function fixAttachById(id, XMLRPCURL, type, email) { * DOM jQuery element with a bad attachment * @return none */ -function addTextLink(att, xmlRpcUrl) { +function addTextLink(att) { var elemS = att.element.getElementsByTagName("td"); var elem = elemS[elemS.length - 1]; createDeadLink("addFix2TextLink", "text", elem, fixAttachById, - [ - att.id, xmlRpcUrl - ], "br"); + [ att.id ], "br"); } -- cgit