Commit 315940a5 authored by Ted Trask's avatar Ted Trask

Remove trailing whitespace

parent 3c023b81
<% local form, viewlibrary, page_info = ... <% local form, viewlibrary, page_info = ...
htmlviewfunctions = require("htmlviewfunctions") htmlviewfunctions = require("htmlviewfunctions")
html = require("acf.html") html = require("acf.html")
%> %>
...@@ -20,7 +20,7 @@ html = require("acf.html") ...@@ -20,7 +20,7 @@ html = require("acf.html")
} }
</script> </script>
<% <%
local tablesortercolumns = {} local tablesortercolumns = {}
if form.value.types then if form.value.types then
...@@ -45,7 +45,7 @@ end ...@@ -45,7 +45,7 @@ end
<% else %> <% else %>
<table id="adhocresult" class="tablesorter"> <table id="adhocresult" class="tablesorter">
<thead> <thead>
<tr> <tr>
<% for i,name in ipairs(form.value.names.value) do %> <% for i,name in ipairs(form.value.names.value) do %>
<th><%= html.html_escape(name) %></th> <th><%= html.html_escape(name) %></th>
<% end %> <% end %>
......
<% local view, viewlibrary, page_info, session = ... <% local view, viewlibrary, page_info, session = ...
htmlviewfunctions = require("htmlviewfunctions") htmlviewfunctions = require("htmlviewfunctions")
html = require("acf.html") html = require("acf.html")
%> %>
......
<% local data, viewlibrary, page_info, session = ... <% local data, viewlibrary, page_info, session = ...
htmlviewfunctions = require("htmlviewfunctions") htmlviewfunctions = require("htmlviewfunctions")
html = require("acf.html") html = require("acf.html")
%> %>
...@@ -31,7 +31,7 @@ html = require("acf.html") ...@@ -31,7 +31,7 @@ html = require("acf.html")
<th>Enabled</th> <th>Enabled</th>
<th>Source</th> <th>Source</th>
<th>Method</th> <th>Method</th>
</tr> </tr>
</thead><tbody> </thead><tbody>
<% local sourcename = cfe({ type="hidden", value="" }) %> <% local sourcename = cfe({ type="hidden", value="" }) %>
<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %> <% local redir = cfe({ type="hidden", value=page_info.orig_action }) %>
......
...@@ -109,12 +109,12 @@ local deletedatabase = function() ...@@ -109,12 +109,12 @@ local deletedatabase = function()
local cmdresult, errtxt = modelfunctions.run_executable({"psql", "-U", "postgres", "-c", cmd}, true) local cmdresult, errtxt = modelfunctions.run_executable({"psql", "-U", "postgres", "-c", cmd}, true)
table.insert(result, errtxt) table.insert(result, errtxt)
table.insert(result, cmdresult) table.insert(result, cmdresult)
cmd = "DROP ROLE "..DatabaseUser cmd = "DROP ROLE "..DatabaseUser
cmdresult, errtxt = modelfunctions.run_executable({"psql", "-U", "postgres", "-c", cmd}, true) cmdresult, errtxt = modelfunctions.run_executable({"psql", "-U", "postgres", "-c", cmd}, true)
table.insert(result, errtxt) table.insert(result, errtxt)
table.insert(result, cmdresult) table.insert(result, cmdresult)
cmd = "DROP ROLE "..DatabaseOwner cmd = "DROP ROLE "..DatabaseOwner
cmdresult, errtxt = modelfunctions.run_executable({"psql", "-U", "postgres", "-c", cmd}, true) cmdresult, errtxt = modelfunctions.run_executable({"psql", "-U", "postgres", "-c", cmd}, true)
table.insert(result, errtxt) table.insert(result, errtxt)
...@@ -280,7 +280,7 @@ local groompublogs = function() ...@@ -280,7 +280,7 @@ local groompublogs = function()
sql = "Delete from pubweblog where logdatetime < '" .. escape(temp) .."'" sql = "Delete from pubweblog where logdatetime < '" .. escape(temp) .."'"
res = assert (con:execute(sql)) res = assert (con:execute(sql))
logme("Deleted " .. res .. " old records from pubweblog") logme("Deleted " .. res .. " old records from pubweblog")
sql = "delete from pubweblog_history where logdatetime < (now() - INTERVAL '1 year')" sql = "delete from pubweblog_history where logdatetime < (now() - INTERVAL '1 year')"
res = assert (con:execute(sql)) res = assert (con:execute(sql))
logme("Deleted " .. res .. " old records from pubweblog_history") logme("Deleted " .. res .. " old records from pubweblog_history")
...@@ -530,7 +530,7 @@ local function checkwords(logentry) ...@@ -530,7 +530,7 @@ local function checkwords(logentry)
if not goodline then if not goodline then
break break
end end
-- ignore blank lines -- ignore blank lines
if string.find(goodline, "%S") then if string.find(goodline, "%S") then
_,instcnt = string.lower(logentry.URL):gsub(format.escapemagiccharacters(goodline), " ") _,instcnt = string.lower(logentry.URL):gsub(format.escapemagiccharacters(goodline), " ")
...@@ -696,7 +696,7 @@ local openlogfile = function(source, cookiesfile, logfile) ...@@ -696,7 +696,7 @@ local openlogfile = function(source, cookiesfile, logfile)
else else
handle = proc.stdout handle = proc.stdout
end end
else else
errtxt = errmsg or "Unknown failure" errtxt = errmsg or "Unknown failure"
end end
......
<% local data, viewlibrary, page_info, session = ... <% local data, viewlibrary, page_info, session = ...
htmlviewfunctions = require("htmlviewfunctions") htmlviewfunctions = require("htmlviewfunctions")
%> %>
......
...@@ -22,7 +22,7 @@ function string_highlight(txtvalue, searchval, fcolour, bcolour) ...@@ -22,7 +22,7 @@ function string_highlight(txtvalue, searchval, fcolour, bcolour)
txtvalue = string_insert(txtvalue,"</font>", sEnd) txtvalue = string_insert(txtvalue,"</font>", sEnd)
txtvalue = string_insert(txtvalue,"<font style='color:"..fcolour.."; background-color:"..bcolour..";'>", sStart) txtvalue = string_insert(txtvalue,"<font style='color:"..fcolour.."; background-color:"..bcolour..";'>", sStart)
end end
end end
return txtvalue return txtvalue
end end
...@@ -176,7 +176,7 @@ end %> ...@@ -176,7 +176,7 @@ end %>
local mark = '' local mark = ''
if watch.selected == "t" then mark=' class="selected"' end if watch.selected == "t" then mark=' class="selected"' end
local time = {} local time = {}
time.year, time.month, time.day, time.hour, time.min, time.sec = time.year, time.month, time.day, time.hour, time.min, time.sec =
string.match(watch.logdatetime, "(%d+)%-(%d+)-(%d+)%s+(%d+):(%d+):(%d+)") string.match(watch.logdatetime, "(%d+)%-(%d+)-(%d+)%s+(%d+):(%d+):(%d+)")
time = os.time(time) %> time = os.time(time) %>
<tr<%= mark %>> <tr<%= mark %>>
...@@ -192,7 +192,7 @@ end %> ...@@ -192,7 +192,7 @@ end %>
<td><%= html.html_escape(watch.bytes) %></td> <td><%= html.html_escape(watch.bytes) %></td>
<td><span class="hide"><%= html.html_escape(watch.badyesno) %></span><% if watch.badyesno ~= "0" then %><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/dodgy.png' width='13' height='13'><% end %></td> <td><span class="hide"><%= html.html_escape(watch.badyesno) %></span><% if watch.badyesno ~= "0" then %><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/dodgy.png' width='13' height='13'><% end %></td>
<td><span class="hide"><%= html.html_escape(watch.deniedyesno) %></span><% if watch.deniedyesno ~= "0" then %> <img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/denied.png' width='13' height='13'><% end %></td> <td><span class="hide"><%= html.html_escape(watch.deniedyesno) %></span><% if watch.deniedyesno ~= "0" then %> <img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/denied.png' width='13' height='13'><% end %></td>
<td><span class="hide"><%= html.html_escape(watch.bypassyesno) %></span><% if watch.bypassyesno ~= "0" then %> <img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/bypass.png' width='13' height='13'><% end %></td> <td><span class="hide"><%= html.html_escape(watch.bypassyesno) %></span><% if watch.bypassyesno ~= "0" then %> <img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/bypass.png' width='13' height='13'><% end %></td>
<td><%= html.html_escape(watch.score) %></td> <td><%= html.html_escape(watch.score) %></td>
<td<% if (watch.shortreason and watch.shortreason ~= "" and watch.reason and watch.reason ~= "") then %> title="<%= html.html_escape(watch.reason) %>"<% end %>> <td<% if (watch.shortreason and watch.shortreason ~= "" and watch.reason and watch.reason ~= "") then %> title="<%= html.html_escape(watch.reason) %>"<% end %>>
<% if (watch.shortreason and watch.shortreason ~= "") then %> <% if (watch.shortreason and watch.shortreason ~= "") then %>
...@@ -202,8 +202,8 @@ end %> ...@@ -202,8 +202,8 @@ end %>
<% end %> <% end %>
</td> </td>
<td title="<%= html.html_escape(watch.uri) %>"><% highlight_uri=html.html_escape(watch.shorturi or watch.uri) <td title="<%= html.html_escape(watch.uri) %>"><% highlight_uri=html.html_escape(watch.shorturi or watch.uri)
if watch.wordloc ~= nil then if watch.wordloc ~= nil then
if string.find(watch.wordloc, "|") then if string.find(watch.wordloc, "|") then
badwords = format.string_to_table(watch.wordloc, "|") badwords = format.string_to_table(watch.wordloc, "|")
for key,wrd in ipairs(badwords) do for key,wrd in ipairs(badwords) do
highlight_uri = string_highlight(highlight_uri, wrd, "yellow", "red") highlight_uri = string_highlight(highlight_uri, wrd, "yellow", "red")
...@@ -211,7 +211,7 @@ end %> ...@@ -211,7 +211,7 @@ end %>
else else
highlight_uri = string_highlight(highlight_uri, watch.wordloc, "yellow", "red") highlight_uri = string_highlight(highlight_uri, watch.wordloc, "yellow", "red")
end end
end %> end %>
<%= highlight_uri %></td> <%= highlight_uri %></td>
<td><%= watch.wordloc %></td> <td><%= watch.wordloc %></td>
</tr> </tr>
......
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