|
@@ -16,18 +16,22 @@ if site_code ~= currentsite then
|
|
|
local configured = false
|
|
|
for _, site in pairs(sites) do
|
|
|
if site.site_code == currentsite then
|
|
|
+ local subst = {}
|
|
|
+ subst['%%SN'] = site.site_name
|
|
|
+ subst['%%SC'] = site.site_code
|
|
|
+
|
|
|
if site.subst then
|
|
|
config = tools.replace_patterns(config, site.subst)
|
|
|
end
|
|
|
+
|
|
|
if (site.site_select or {}).group and groups and groups[site.site_select.group] then
|
|
|
group = groups[site.site_select.group]
|
|
|
+ subst['%%GN'] = site.site_select.group
|
|
|
if group.subst then
|
|
|
config = tools.replace_patterns(config, group.subst)
|
|
|
end
|
|
|
end
|
|
|
- local subst = {}
|
|
|
- subst['%%SN'] = site.site_name
|
|
|
- subst['%%SC'] = site.site_code
|
|
|
+
|
|
|
config = tools.replace_patterns(config, subst)
|
|
|
|
|
|
local file = '/lib/gluon/site.json'
|