aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-06-06 13:30:49 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-06-06 13:30:49 +0200
commit2d67008193187991bb61de59597925f3b776df35 (patch)
tree161e9cb1bf86aa2659d5cc17589ca95ca7bb7cf4
parent04ae9089f8a4d92764455491bbbc9cb805580c73 (diff)
downloadbugzilla-triage-2d67008193187991bb61de59597925f3b776df35.tar.gz
Make fixing MIME types of attachments working again.
When the Attachment is suddenly object instead of an array.
-rw-r--r--data/lib/collectingMetadata.js2
-rw-r--r--data/rhlib/fixingAttMIME.js6
-rw-r--r--lib/libbugzilla.js1
3 files changed, 4 insertions, 5 deletions
diff --git a/data/lib/collectingMetadata.js b/data/lib/collectingMetadata.js
index efd9754..06b43ac 100644
--- a/data/lib/collectingMetadata.js
+++ b/data/lib/collectingMetadata.js
@@ -155,7 +155,7 @@ AttachList.prototype.markBadAttachments = function markBadAttachments() {
createDeadLink("fixAllButton", "Fix all", titleElement, function() {
Array.forEach(badAttachments, function(x) {
- fixAttachById(x[1], constantData.XMLRPCData[window.location.hostname].url);
+ fixAttachById(x.id, constantData.XMLRPCData[window.location.hostname].url);
});
}, [], false, null, "f");
badAttachments.forEach(function(x, i, a) {
diff --git a/data/rhlib/fixingAttMIME.js b/data/rhlib/fixingAttMIME.js
index 9834cfa..f61ddbd 100644
--- a/data/rhlib/fixingAttMIME.js
+++ b/data/rhlib/fixingAttMIME.js
@@ -78,11 +78,11 @@ function fixAttachById(id, XMLRPCURL, type, email) {
* <TR> DOM jQuery element with a bad attachment
* @return none
*/
-function addTextLink(row, xmlRpcUrl) {
- var elemS = row[4].getElementsByTagName("td");
+function addTextLink(att, xmlRpcUrl) {
+ var elemS = att.element.getElementsByTagName("td");
var elem = elemS[elemS.length - 1];
createDeadLink("addFix2TextLink", "text", elem, fixAttachById,
[
- row[1], xmlRpcUrl
+ att.id, xmlRpcUrl
], "br");
}
diff --git a/lib/libbugzilla.js b/lib/libbugzilla.js
index 5b77e25..2f0bebb 100644
--- a/lib/libbugzilla.js
+++ b/lib/libbugzilla.js
@@ -345,7 +345,6 @@ exports.makeJSONRPCCallWithLogin = function makeJSONRPCCallWithLogin(url, method
password: passObj.password,
remember: false
}, function(logResult) {
- console.log("logResult = " + logResult.toSource());
makeJSONRPCCall(url, method, params, callback);
});
}