From 516eebd82b4e89aeaa13e8173e0242a3597a7c14 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 10 Aug 2016 14:56:36 +0000 Subject: Remove trailing whitespace --- Makefile | 2 +- dansguardian-general-html.lsp | 8 ++++---- dansguardian-listfiles-html.lsp | 6 +++--- dansguardian-model.lua | 16 ++++++++-------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 5100c00..bbb2300 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ APP_DIST=\ EXTRA_DIST=README Makefile config.mk -DISTFILES=$(APP_DIST) $(EXTRA_DIST) +DISTFILES=$(APP_DIST) $(EXTRA_DIST) TAR=tar diff --git a/dansguardian-general-html.lsp b/dansguardian-general-html.lsp index 6cbaddc..fabfafe 100644 --- a/dansguardian-general-html.lsp +++ b/dansguardian-general-html.lsp @@ -1,8 +1,8 @@ -<% 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) %>

-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".

diff --git a/dansguardian-listfiles-html.lsp b/dansguardian-listfiles-html.lsp index 08ec66e..55bfb8f 100644 --- a/dansguardian-listfiles-html.lsp +++ b/dansguardian-listfiles-html.lsp @@ -1,4 +1,4 @@ -<% 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 %> File Size Last Modified - + <% local filename = cfe({ type="hidden", value="" }) %> <% local redir = cfe({ type="hidden", value=page_info.orig_action }) %> diff --git a/dansguardian-model.lua b/dansguardian-model.lua index 7fbabb4..2a5c7cd 100644 --- a/dansguardian-model.lua +++ b/dansguardian-model.lua @@ -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." -- cgit v1.2.3