aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libbugzilla.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-04-28 13:28:55 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-06-05 14:47:40 +0200
commit55d9a312fbba91f1bcf5e3f3291b7bece8abb178 (patch)
treebb9ef165b425273da47aa000268395f87f26678e /lib/libbugzilla.js
parent34bbe8e7306a0d0ec014db7512788ed92c625d19 (diff)
downloadbugzilla-triage-55d9a312fbba91f1bcf5e3f3291b7bece8abb178.tar.gz
Reformatting to MoFo coding style
Diffstat (limited to 'lib/libbugzilla.js')
-rw-r--r--lib/libbugzilla.js40
1 files changed, 21 insertions, 19 deletions
diff --git a/lib/libbugzilla.js b/lib/libbugzilla.js
index 7e2398b..c85d331 100644
--- a/lib/libbugzilla.js
+++ b/lib/libbugzilla.js
@@ -38,23 +38,26 @@ function log(msg) {
}
/**
- * parse XML object out of string working around various bugs in Gecko implementation
- * see https://developer.mozilla.org/en/E4X for more information
- *
- * @param inStr String with unparsed XML string
+ * parse XML object out of string working around various bugs in Gecko
+ * implementation see https://developer.mozilla.org/en/E4X for more information
+ *
+ * @param inStr
+ * String with unparsed XML string
* @return XML object
*/
function parseXMLfromString (inStuff) {
- // if (typeof inStuff !== 'string') In future we should recognize this.response
+ // if (typeof inStuff !== 'string') In future we should recognize
+ // this.response
// and get just .text property out of it. TODO
- var respStr = inStuff.replace(/^<\?xml\s+version\s*=\s*(["'])[^\1]+\1[^?]*\?>/, ""); // bug 336551
+ var respStr = inStuff.replace(/^<\?xml\s+version\s*=\s*(["'])[^\1]+\1[^?]*\?>/, ""); // bug
+ // 336551
return new XML(respStr);
}
/**
- * In case URL contains alias, not the real bug number, get the real bug no
- * from the XML representation. Sets correct value to this.bugNo.
- *
+ * In case URL contains alias, not the real bug number, get the real bug no from
+ * the XML representation. Sets correct value to this.bugNo.
+ *
* This is a slow variant for bugs other than actual window
*/
function getRealBugNoSlow(bugNo, location, callback) {
@@ -141,14 +144,11 @@ exports.changeJSONURL = function changeJSONURL() {
};
/**
- *
- libbz.getInstalledPackages(msg.data, function (pkgsMsg) {
- worker.postMessage(pkgsMsg);
-
- locationLoginObj: {
- location: window.location.href,
- login: getLogin()
- }
+ *
+ * libbz.getInstalledPackages(msg.data, function (pkgsMsg) {
+ * worker.postMessage(pkgsMsg);
+ *
+ * locationLoginObj: { location: window.location.href, login: getLogin() }
*/
exports.getInstalledPackages = function getInstalledPackages(locationLoginObj, callback) {
var installedPackages = {};
@@ -283,14 +283,16 @@ exports.createUpstreamBug = function createUpstreamBug(urlStr, subject, comment)
});
};
-// Make a XML-RPC call ... most of the business logic should stay in the content script
+// Make a XML-RPC call ... most of the business logic should stay in the content
+// script
exports.makeXMLRPCCall = function makeXMLRPCCall(url, login, method, params, callback) {
var urlObj = urlMod.URL(url);
getPassword(login,
urlObj.schema + "://" + urlObj.host,
function (passwObj) {
if (!passwObj.password) {
- // TODO this should happen, only when user presses Escape in password prompt
+ // TODO this should happen, only when user presses Escape in password
+ // prompt
return null;
}