|
@@ -4,8 +4,7 @@ local uci = require('luci.model.uci').cursor()
|
|
|
local json = require 'luci.json'
|
|
|
local tools = require 'gluon.site_generate'
|
|
|
local shape = require 'gluon.pointwithinshape'
|
|
|
-
|
|
|
-local geo_default_site = "ffho_yho"
|
|
|
+local site_conf = require 'gluon.site_conf'
|
|
|
|
|
|
function get_config(file)
|
|
|
local f = io.open(file)
|
|
@@ -47,7 +46,11 @@ function get_site_by_geo(latitude, longitude)
|
|
|
end
|
|
|
end
|
|
|
|
|
|
- return geo_default_site
|
|
|
+ if (site_conf.site_select or {}).geo_default_site then
|
|
|
+ return site_conf.site_select.geo_default_site
|
|
|
+ end
|
|
|
+
|
|
|
+ return nil
|
|
|
end
|
|
|
|
|
|
local currentsite = uci:get('currentsite', 'current', 'name')
|