changeset 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 ca17b63f561f
children fd69d35cf2e6
files modules/mod_manage.js modules/mod_retrieve.js
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
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);
 			}
 		}
 
--- a/modules/mod_retrieve.js
+++ b/modules/mod_retrieve.js
@@ -100,8 +100,8 @@ exports.retrieveItems = {
 		}
 
 		var item = [];
-		for (var i=0; i<request.children.length; i++) {
-			var j = request.children[i];
+		for (var i=0; i<request.tags.length; i++) {
+			var j = request.tags[i];
 			if (j.name == 'item' && j.attr['id'] && j.attr['id'] != '')
 				item.push(j.attr['id']);
 		}