aboutsummaryrefslogtreecommitdiffstats
path: root/bugzillaBugTriage.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-05-03 14:53:08 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-05-03 14:53:08 +0200
commit0b742126acad12af78fe379474d735f772baeae3 (patch)
treefe92688646e14ac238c229dcd1aa263a96f78730 /bugzillaBugTriage.js
parent39c56d15058d38c04c923f5b7b0ff728f7520317 (diff)
downloadbugzilla-triage-0b742126acad12af78fe379474d735f772baeae3.tar.gz
- heir() is a creation of the Evil, don't use it
- fix MIME messages
Diffstat (limited to 'bugzillaBugTriage.js')
-rw-r--r--bugzillaBugTriage.js53
1 files changed, 26 insertions, 27 deletions
diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js
index 1287132..97b9568 100644
--- a/bugzillaBugTriage.js
+++ b/bugzillaBugTriage.js
@@ -144,13 +144,11 @@ XMLRPCMessage.prototype.xml = function() {
// do individual parameters
for ( var i = 0; i < this.params.length; i++) {
var data = this.params[i];
- xml += "<param>\n";
-
- xml += "<value>"
- + this.getParamXML(this.dataTypeOf(data),
- data) + "</value>\n";
-
- xml += "</param>\n";
+ xml += "<param>\n";
+ xml += "<value>"
+ + this.getParamXML(this.dataTypeOf(data),
+ data) + "</value>\n";
+ xml += "</param>\n";
}
xml += "</params>\n";
@@ -267,20 +265,18 @@ XMLRPCMessage.prototype.getParamXML = function(type, data) {
return xml;
};
-/*
- * Create and return an object that has p as its prototype
- *
- * @param p parent Object
- * @return child Object
- */
-if (typeof Object.create !== 'function') {
- Object.prototype.create = function () {
- function F() {};
- F.prototype = this;
- delete F.prototype.create;
- return new F();
- };
-}
+///*
+// * Create and return an object that has p as its prototype
+// *
+// * @param p parent Object
+// * @return child Object
+// */
+//heir = function (o) {
+// function F() {};
+// F.prototype = o;
+// delete F.prototype.create;
+// return new F();
+//};
// ==============================================================
var hlpr = function () {
@@ -938,16 +934,16 @@ BZPage.prototype.getLogin = function () {
// ====================================================================================
// MozillaBugzilla object
-function MozillaBugzilla() {
+MozillaBugzilla = function () {
-}
-
-MozillaBugzilla.prototype = BZPage.prototype.create();
+};
+MozillaBugzilla.prototype = new BZPage();
+MozillaBugzilla.prototype.constructor = MozillaBugzilla;
// ====================================================================================
// RHBugzillaPage object
-function RHBugzillaPage(doc) {
+RHBugzillaPage = function(doc) {
// For identification of graphics card
const manuChipStrs = [ [ "ATI Radeon", "ATI", "1002" ],
[ "ATI Mobility Radeon", "ATI", "1002" ],
@@ -1197,7 +1193,8 @@ function RHBugzillaPage(doc) {
}
} // END OF RHBugzillaPage CONSTRUCTOR
-RHBugzillaPage.prototype = BZPage.prototype.create();
+RHBugzillaPage.prototype = new BZPage();
+RHBugzillaPage.prototype.constructor = RHBugzillaPage;
/* Offline supporting functions */
/**
@@ -1958,7 +1955,9 @@ RHBugzillaPage.prototype.fixAttachById = function(id, type, email) {
'mime_type' : type,
'nomail' : !email
});
+ console.log("XML-RPC message:\n"+msg.xml());
msg.addParameter(this.login);
+ console.log("XML-RPC message:\n"+msg.xml());
msg.addParameter(this.password);
console.log("XML-RPC message:\n"+msg.xml());