From 632abafabf6a1f3011fffd9cff9f5b65258ec1d2 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 27 May 2009 08:59:02 +0000 Subject: [PATCH] modules/admin-{mini,full}: sort by keys in language selection --- modules/admin-full/luasrc/model/cbi/admin_index/luci.lua | 2 +- modules/admin-mini/luasrc/model/cbi/mini/luci.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/admin-full/luasrc/model/cbi/admin_index/luci.lua b/modules/admin-full/luasrc/model/cbi/admin_index/luci.lua index 6ec13b84e..caf7c9788 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_index/luci.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_index/luci.lua @@ -28,7 +28,7 @@ l = c:option(ListValue, "lang", translate("language")) l:value("auto") local i18ndir = luci.i18n.i18ndir .. "default." -for k, v in pairs(luci.config.languages) do +for k, v in luci.util.kspairs(luci.config.languages) do local file = i18ndir .. k:gsub("_", "-") if k:sub(1, 1) ~= "." and ( luci.fs.access(file .. ".lua") or diff --git a/modules/admin-mini/luasrc/model/cbi/mini/luci.lua b/modules/admin-mini/luasrc/model/cbi/mini/luci.lua index d3afd5537..0a57b3056 100644 --- a/modules/admin-mini/luasrc/model/cbi/mini/luci.lua +++ b/modules/admin-mini/luasrc/model/cbi/mini/luci.lua @@ -28,7 +28,7 @@ l = c:option(ListValue, "lang", translate("language")) l:value("auto") local i18ndir = luci.i18n.i18ndir .. "default." -for k, v in pairs(luci.config.languages) do +for k, v in luci.util.kspairs(luci.config.languages) do local file = i18ndir .. k:gsub("_", "-") if k:sub(1, 1) ~= "." and ( luci.fs.access(file .. ".lua") or -- 2.25.1