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-04-28 18:26:14 +0200
commit32af48e442a960b8c3f199f5ffad28a34590fcda (patch)
treec291cb97627bd2cfb65167347261d5ef8f521bfd /lib/libbugzilla.js
parent2382ba19afc84e9b747a7981ebf72aaa704f08b6 (diff)
downloadbugzilla-triage-32af48e442a960b8c3f199f5ffad28a34590fcda.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;
}