Mercurial > psgxs
diff modules/mod_manage.js @ 54:c2c9c06d6e9d
Fix problems with unneeded text nodes.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 06 May 2011 17:51:15 +0200 |
parents | c979c4d0932b |
children | b98e545a94f7 |
line wrap: on
line diff
--- a/modules/mod_manage.js +++ b/modules/mod_manage.js @@ -154,9 +154,9 @@ exports.modifyAff = { return makeError(response, errors.forbidden.n); var e = false; - for (var i in request.children) { - var jid = request.children[i].getAttribute('jid'); - var affiliation = request.children[i].getAttribute('affiliation'); + for (var i in request.tags) { + var jid = request.tags[i].getAttribute('jid'); + var affiliation = request.tags[i].getAttribute('affiliation'); var set = storage.setAffiliation(nodeID, jid, affiliation); if (typeof set == 'number') @@ -164,7 +164,7 @@ exports.modifyAff = { else { // SECTION 8.9.4 notifs.send(jid, 'affiliations', nodeID, {jid: jid, affiliation: affiliation}); - request.children.splice(i, 1); + request.tags.splice(i, 1); } }