summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2012-01-19 21:10:27 +0000
committerTed Trask <ttrask01@yahoo.com>2012-01-19 21:10:27 +0000
commit1e53255088385fcfe49747202227d30a76e08c89 (patch)
tree0b3732e9bb7fc2fb07c66afcf79a142372bce587 /lib
parent2b3a7472f9b4c3c25e1fe7d607d5d0df7eac90e8 (diff)
downloadacf-core-1e53255088385fcfe49747202227d30a76e08c89.tar.bz2
acf-core-1e53255088385fcfe49747202227d30a76e08c89.tar.xz
Fixed bug in roles where last matching controller used, rather than first
Diffstat (limited to 'lib')
-rw-r--r--lib/roles.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/roles.lua b/lib/roles.lua
index 7c69724..8cc5332 100644
--- a/lib/roles.lua
+++ b/lib/roles.lua
@@ -52,7 +52,9 @@ get_controllers = function(self,pre,controller)
filename = string.match(v,"[^/]*.lua")
name = string.match(filename,"[^.]*")
sname = string.match(filename,"[^-]*")
- temp[prefix..sname] = {path=path,prefix=prefix,filename=filename,name=name,sname=sname}
+ if not temp[prefix..sname] then -- only keep the first of each
+ temp[prefix..sname] = {path=path,prefix=prefix,filename=filename,name=name,sname=sname}
+ end
end
if pre and controller then
return temp[pre..controller]