changeset 48:c979c4d0932b

Little fixes for strict mode compatibility.
author Sonny Piers <sonny.piers@gmail.com>
date Sat, 19 Mar 2011 14:57:13 +0100
parents 0d3f18bb1d36
children 7e421278b31b
files modules/mod_manage.js modules/mod_publish.js storage.js
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/modules/mod_manage.js
+++ b/modules/mod_manage.js
@@ -154,7 +154,7 @@ exports.modifyAff = {
 			return makeError(response, errors.forbidden.n);
 
 		var e = false;
-		for (i in request.children) {
+		for (var i in request.children) {
 			var jid = request.children[i].getAttribute('jid');
 			var affiliation = request.children[i].getAttribute('affiliation');
 
--- a/modules/mod_publish.js
+++ b/modules/mod_publish.js
@@ -86,7 +86,7 @@ exports.publish = {
 
 		var content = item.getChild();
 
-		subscribers = storage.setItem(nodeID, itemID, content);
+		var subscribers = storage.setItem(nodeID, itemID, content);
 		if (typeof subscribers == 'number')
 			return makeError(response, subscribers);
 
--- a/storage.js
+++ b/storage.js
@@ -210,7 +210,7 @@ storage.setItem = function(nodeID, itemI
 	if (typeof itemID != 'string')
 		itemID = fdsq.makeRandomId();
 
-	i = node.setItem(itemID, content);
+	var i = node.setItem(itemID, content);
 	if (content)
 		i.content = content;
 
@@ -226,7 +226,7 @@ storage.deleteItem = function(nodeID, it
 	if (typeof itemID != 'string')
 		return errors.pub.retract.item_or_itemid_required.n;
 
-	item = node.setItem(itemID);
+	var item = node.setItem(itemID);
 	if (typeof item == 'number')
 		return item;