X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Ffreifunk%2Fluasrc%2Fmodel%2Fcbi%2Ffreifunk%2Fprofile_expert.lua;fp=modules%2Ffreifunk%2Fluasrc%2Fmodel%2Fcbi%2Ffreifunk%2Fprofile_expert.lua;h=0000000000000000000000000000000000000000;hp=0d890e1df6337809923ea1f633848917d741eb36;hb=1bb4822dca6113f73e3bc89e2acf15935e6f8e92;hpb=9edd0e46c3f880727738ce8ca6ff1c8b85f99ef4 diff --git a/modules/freifunk/luasrc/model/cbi/freifunk/profile_expert.lua b/modules/freifunk/luasrc/model/cbi/freifunk/profile_expert.lua deleted file mode 100644 index 0d890e1df..000000000 --- a/modules/freifunk/luasrc/model/cbi/freifunk/profile_expert.lua +++ /dev/null @@ -1,41 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2011 Manuel Munz - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - httc://www.apache.org/licenses/LICENSE-2.0 -]]-- - -local fs = require "nixio.fs" -local uci = require "luci.model.uci".cursor() -local community = uci:get("freifunk", "community", "name") - -if community == nil then - luci.http.redirect(luci.dispatcher.build_url("admin", "freifunk", "profile_error")) - return -else - community = "/etc/config/profile_" .. community - f = SimpleForm("community", translate("Community profile"), translate("You can manually edit the selected community profile here.")) - - t = f:field(TextValue, "cop") - t.rmempty = true - t.rows = 30 - function t.cfgvalue() - return fs.readfile(community) or "" - end - - function f.handle(self, state, data) - if state == FORM_VALID then - if data.cop then - fs.writefile(community, data.cop:gsub("\r\n", "\n")) - end - end - return true - end - return f -end -