diff options
author | Ted Trask <ttrask01@yahoo.com> | 2011-09-05 18:35:47 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2011-09-05 18:35:47 +0000 |
commit | 40bef25ea3fcef7395b2ed259fb2d55474c95db2 (patch) | |
tree | 3ffd924a3c13082062cfd82ad95996541a2eee57 | |
parent | 13bcbf20e2bdca284b35f5ebe71fc47ba75be3d7 (diff) | |
download | acf-weblog-40bef25ea3fcef7395b2ed259fb2d55474c95db2.tar.bz2 acf-weblog-40bef25ea3fcef7395b2ed259fb2d55474c95db2.tar.xz |
Removed historydays, since now unused
-rw-r--r-- | weblog-model.lua | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/weblog-model.lua b/weblog-model.lua index d8d28ee..87b2618 100644 --- a/weblog-model.lua +++ b/weblog-model.lua @@ -295,7 +295,6 @@ end local groompublogs = function() local purgedays = config.purgedays or 30 --local watchdays = config.watchdays or 14 - --local historydays = config.historydays or 14 local now = os.time() @@ -310,22 +309,6 @@ local groompublogs = function() sql = "Delete from pubweblog where logdatetime < '" .. temp .."'" res = assert (con:execute(sql)) logme("Deleted " .. res .. " old records to from pubweblog") - - -- purge anything older than startddate+historydays+watchdays - --local temp = config.auditstart - --if not temp or temp == "" then temp = os.date("%Y-%m-%d %H:%M:%S") end - --logme("Purge date since last audit is " .. tostring(watchdays+historydays) .. " days before " .. temp .. ".") - - --sql = "delete from pubweblog where logdatetime < (timestamp '"..temp.."' - INTERVAL '"..tostring(watchdays+historydays).." days')" - --res = assert (con:execute(sql)) - --logme("removed " .. res .. " old pubweblog records that are older than history+watchdays") - - -- purge good people after historydays - --logme("The delete date for non-watchlist users is " .. tostring(historydays) .. " days before " .. temp .. ".") - - --sql = "delete from pubweblog where logdatetime < (timestamp '".. temp.."' - INTERVAL '"..tostring(historydays).." days') and clientuserid NOT IN (select clientuserid from watchlist)" - --res = assert (con:execute(sql)) - --logme("removed " .. res .. " records for users not on the watchlist.") end local listwatchlistentries = function() @@ -1338,7 +1321,6 @@ function getconfig() result.window = cfe({ value=config.window or "5", label="Time Window", descr="Minutes of activity to display before and after selected block" }) result.watchdays = cfe({ value=config.watchdays or "14", label="Days to Watch", descr="Number of additional days to keep history for users in watchlist" }) result.purgedays = cfe({ value=config.purgedays or "30", label="Days before Purge", descr="Days to keep history, regardless of audit" }) - result.historydays = cfe({ value=config.historydays or "14", label="Days to keep History", descr="Days beyond Audit Start Time to keep complete log history" }) result.shorturi = cfe({ type="boolean", value=(config.shorturi == "true"), label="Truncate URLs", descr="You can limit the length of displayed URLs by enabling this option"}) result.shortreason = cfe({ type="boolean", value=(config.shortreason == "true"), label="Short Reason", descr="Display a short reason (dansguardian only)"}) result.stoponerror = cfe({ type="boolean", value=(config.stoponerror == "true"), label="Stop on Error", descr="Stop import of logs if an error is encountered"}) @@ -1362,10 +1344,6 @@ local function validateconfig(newconfig) newconfig.value.purgedays.errtxt = "Must be a number" success = false end - if not validator.is_integer(newconfig.value.historydays.value) then - newconfig.value.historydays.errtxt = "Must be a number" - success = false - end local res, err = pcall(function() databaseconnect(DatabaseUser) local s @@ -1395,7 +1373,6 @@ function updateconfig(newconfig) configcontent = format.update_ini_file(configcontent, "", "window", newconfig.value.window.value) configcontent = format.update_ini_file(configcontent, "", "watchdays", newconfig.value.watchdays.value) configcontent = format.update_ini_file(configcontent, "", "purgedays", newconfig.value.purgedays.value) - configcontent = format.update_ini_file(configcontent, "", "historydays", newconfig.value.historydays.value) --configcontent = format.update_ini_file(configcontent, "", "groupby", newconfig.value.groupby.value) configcontent = format.update_ini_file(configcontent, "", "shorturi", tostring(newconfig.value.shorturi.value)) configcontent = format.update_ini_file(configcontent, "", "shortreason", tostring(newconfig.value.shortreason.value)) |