Software /
code /
prosody
Comparison
core/modulemanager.lua @ 3596:bbeba9f2acf8
modulemanager: load_modules_for_host(): For components, the inherited modules are the intersection of the inheritable and global modules lists, not the difference.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 10 Nov 2010 19:54:38 +0500 |
parent | 3595:ec1151d0c4a4 |
child | 3598:48ebea937260 |
comparison
equal
deleted
inserted
replaced
3595:ec1151d0c4a4 | 3596:bbeba9f2acf8 |
---|---|
71 if host_modules_disabled == global_modules_disabled then host_modules_disabled = nil; end | 71 if host_modules_disabled == global_modules_disabled then host_modules_disabled = nil; end |
72 | 72 |
73 local host_modules = set.new(host_modules_enabled) - set.new(host_modules_disabled); | 73 local host_modules = set.new(host_modules_enabled) - set.new(host_modules_disabled); |
74 local global_modules = set.new(autoload_modules) + set.new(global_modules_enabled) - set.new(global_modules_disabled); | 74 local global_modules = set.new(autoload_modules) + set.new(global_modules_enabled) - set.new(global_modules_disabled); |
75 if component then | 75 if component then |
76 global_modules = set.new(component_inheritable_modules) - global_modules; | 76 global_modules = set.intersection(set.new(component_inheritable_modules), global_modules); |
77 end | 77 end |
78 local modules = global_modules + host_modules; | 78 local modules = global_modules + host_modules; |
79 | 79 |
80 if component then | 80 if component then |
81 load(host, component); | 81 load(host, component); |