Commit 516eebd8 authored by Ted Trask's avatar Ted Trask

Remove trailing whitespace

parent 41034349
......@@ -8,7 +8,7 @@ APP_DIST=\
EXTRA_DIST=README Makefile config.mk
DISTFILES=$(APP_DIST) $(EXTRA_DIST)
DISTFILES=$(APP_DIST) $(EXTRA_DIST)
TAR=tar
......
<% local form, viewlibrary, page_info, session = ...
<% local form, viewlibrary, page_info, session = ...
htmlviewfunctions = require("htmlviewfunctions")
%>
<% if viewlibrary and viewlibrary.dispatch_component then
<% if viewlibrary and viewlibrary.dispatch_component then
viewlibrary.dispatch_component("status")
end %>
......@@ -38,8 +38,8 @@ These parameters define the ip address and port that Dansguardian should forward
<% htmlviewfunctions.displaysectionend(header_level2) %>
<% htmlviewfunctions.displaysectionstart(cfe({label="Filter Actions"}), page_info, header_level2) %>
<p>
These parameters define how sensitive the filter is, and where to redirect requests if the content filter
determines that the content is inappropriate. The "naughtynesslimit" is more sensitive the lower it is set.
These parameters define how sensitive the filter is, and where to redirect requests if the content filter
determines that the content is inappropriate. The "naughtynesslimit" is more sensitive the lower it is set.
The author recommends 50 for "young children", 100 for "older children" and 160 for "young adults".
</p>
......
<% local view, viewlibrary, page_info, session = ...
<% local view, viewlibrary, page_info, session = ...
htmlviewfunctions = require("htmlviewfunctions")
html = require("acf.html")
%>
......@@ -23,7 +23,7 @@ html = require("acf.html")
<% htmlviewfunctions.displaycommandresults({"edit"}, session) %>
<% if viewlibrary and viewlibrary.dispatch_component then
<% if viewlibrary and viewlibrary.dispatch_component then
viewlibrary.dispatch_component("status")
end %>
......@@ -34,7 +34,7 @@ end %>
<th>File</th>
<th>Size</th>
<th>Last Modified</th>
</tr>
</tr>
</thead><tbody>
<% local filename = cfe({ type="hidden", value="" }) %>
<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %>
......
......@@ -107,12 +107,12 @@ mymodule.read_general_config = function()
if config.proxyport then retval.proxyport.value = config.proxyport end
if config.accessdeniedaddress then retval.accessdeniedaddress.value = string.sub(config.accessdeniedaddress, 2, -2) end
end
config = format.parse_ini_file(fs.read_file(dansguardiancfg2) or "", "")
if config then
if config.naughtynesslimit then retval.naughtynesslimit.value = config.naughtynesslimit end
end
return cfe({ type="group", value=retval, label="Dansguardian General Config" })
end
......@@ -121,7 +121,7 @@ mymodule.update_general_config = function(self, config)
if success then
local text = fs.read_file(dansguardiancfg) or ""
text = format.update_ini_file(text, "", "filterip", config.value.filterip.value)
text = format.update_ini_file(text, "", "filterport", config.value.filterport.value)
text = format.update_ini_file(text, "", "proxyip", config.value.proxyip.value)
......@@ -135,7 +135,7 @@ mymodule.update_general_config = function(self, config)
else
config.errtxt = "Failed to set config"
end
return config
end
......@@ -176,7 +176,7 @@ get_categories = function()
local retval = {}
local entries = posix.dir( baseurl .. "/phraselists" )
for k,v in ipairs( entries ) do
local attrs = posix.stat( baseurl .. "/phraselists/" .. v )
......@@ -186,7 +186,7 @@ get_categories = function()
for k1,v1 in pairs(posix.dir( baseurl .. "/phraselists/" .. v )) do
if not string.match(v1, "^%.") then
local active
if (categoryfilecontent[string.match(v1,'%w*')][baseurl .. "/phraselists/" .. v .."/" .. v1]) then
if (categoryfilecontent[string.match(v1,'%w*')][baseurl .. "/phraselists/" .. v .."/" .. v1]) then
active = true
someactive = true
end
......@@ -196,14 +196,14 @@ get_categories = function()
table.insert( retval, {name=v, option=entrycontent, active=someactive} )
end
end
return retval
end
get_category = function(category, object)
local filename = baseurl .. "/phraselists/" .. category .. "/" .. object
if not (categoryfilecontent[string.match(object,'%w*')]) or
if not (categoryfilecontent[string.match(object,'%w*')]) or
not (fs.is_file(filename)) or
not (validator.is_valid_filename(filename, baseurl)) then
return nil, "Something went wrong."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment