diff options
author | Matěj Cepl <mcepl@redhat.com> | 2011-04-26 23:54:37 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2011-04-26 23:54:37 +0200 |
commit | 1221c852936200e843b51ee1cd50bd2c4a8cd6ae (patch) | |
tree | 56a0508ee4592b07ab2264c0b058d688a663c39e | |
parent | 025d863491d6792f4d6e2293eee73163e9e90145 (diff) | |
download | bugzilla-triage-1221c852936200e843b51ee1cd50bd2c4a8cd6ae.tar.gz |
We were missing many attributes from configData.
-rw-r--r-- | lib/libbugzilla.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/libbugzilla.js b/lib/libbugzilla.js index 613dbb3..7e2398b 100644 --- a/lib/libbugzilla.js +++ b/lib/libbugzilla.js @@ -19,6 +19,10 @@ var JSONURLDefault = "https://fedorahosted.org/released"+ "/bugzilla-triage-scripts/Config_data.json"; var BTSPrefNS = "bugzilla-triage.setting."; var BTSPassRealm = "BTSXMLRPCPass"; +var copiedAttributes = [ "queryButton", "upstreamButton", "parseAbrtBacktraces", + "submitsLogging", "XorgLogAnalysis", "objectStyle", "signature", + "suspiciousComponents" ]; + var passwords = {}; // hash of passwords indexed by a hostname var config = exports.config = {}; @@ -167,6 +171,7 @@ exports.getInstalledPackages = function getInstalledPackages(locationLoginObj, c } } + var allIdx = null; if ((allIdx = enabledPackages.indexOf("all")) != -1) { enabledPackages = enabledPackages.splice(allIdx, @@ -377,15 +382,11 @@ exports.initialize = function initialize(config, callback) { config.configData.defBugzillaMaintainerArr = config.constantData.CCmaintainer; } - if ("suspiciousComponents" in config.gJSONData.configData) { - config.configData.suspiciousComponents = - config.gJSONData.configData.suspiciousComponents; - } - - if ("XorgLogAnalysis" in config.gJSONData.configData) { - config.configData.xorglogAnalysis = - config.gJSONData.configData.XorgLogAnalysis; - } + copiedAttributes.forEach(function (attrib) { + if (attrib in config.gJSONData.configData) { + config.configData[attrib] = config.gJSONData.configData[attrib]; + } + }); if ("submitsLogging" in config.gJSONData.configData && config.gJSONData.configData.submitsLogging) { |