let's not clobber the loop variable
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 20 Mar 2009 18:53:41 +0000 (18:53 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 20 Mar 2009 18:53:41 +0000 (18:53 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12631 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/User.js

index a7cbc48..11ca1a5 100644 (file)
@@ -205,16 +205,18 @@ if(!dojo._hasResource["openils.User"]) {
                 var permMap = {};
                 if(r) permMap = openils.Util.readResponse(r);
                 var orgList = [];
+
                 for(var i = 0; i < permList.length; i++) {
                     var perm = permList[i];
                     var permOrgList = permMap[perm] || self.permOrgCache[self.user.id()][perm];
                     self.permOrgCache[self.user.id()][perm] = permOrgList;
-                    for(var i in permOrgList) {
+
+                    for(var j in permOrgList) {
                         if(includeDescendents) {
                             orgList = orgList.concat(
-                                fieldmapper.aou.descendantNodeList(permOrgList[i]));
+                                fieldmapper.aou.descendantNodeList(permOrgList[j]));
                         } else {
-                            orgList = orgList.concat(fieldmapper.aou.findOrgUnit(permOrgList[i]));
+                            orgList = orgList.concat(fieldmapper.aou.findOrgUnit(permOrgList[j]));
                         }
                     }
                 }