From: erickson Date: Fri, 20 Mar 2009 18:53:41 +0000 (+0000) Subject: let's not clobber the loop variable X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=917f1c32b47140d2646cf36f0d83f0c98a4e63b6;p=evergreen%2Fbjwebb.git let's not clobber the loop variable git-svn-id: svn://svn.open-ils.org/ILS/trunk@12631 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/dojo/openils/User.js b/Open-ILS/web/js/dojo/openils/User.js index a7cbc48b3..11ca1a5df 100644 --- a/Open-ILS/web/js/dojo/openils/User.js +++ b/Open-ILS/web/js/dojo/openils/User.js @@ -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])); } } }