diff options
Diffstat (limited to 'weblog-model.lua')
-rw-r--r-- | weblog-model.lua | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/weblog-model.lua b/weblog-model.lua index dd07f83..dd22723 100644 --- a/weblog-model.lua +++ b/weblog-model.lua @@ -1242,11 +1242,12 @@ function getweblog(activelog, clientuserid, starttime, endtime, clientip, badyes if (not starttime or starttime=="") and (not endtime or endtime=="") and config.auditstart~="" and config.auditend~="" then starttime = config.auditstart endtime = config.auditend + end - if config.badyesno=="true" then - badyesno = '1' - end + if config.badyesno=="true" then + badyesno = '1' end + if (not score or score=="") and config.minimumscore~="" then score = config.minimumscore end @@ -1316,17 +1317,17 @@ end function getconfig() local result = {} - result.auditstart = cfe({ value=config.auditstart or "", label="Audit Start Time" }) - result.auditend = cfe({ value=config.auditend or "", label="Audit End Time" }) - result.badyesno = cfe({ type="boolean", value=(config.badyesno == "1"), label="Display Suspect Records", descr="Show only records flagged as suspect on initial display" }) - result.minimumscore = cfe({ value=config.minimumscore or "0", label="Minimum Score", descr="Minimum Score to search for" }) - result.sortby = cfe({ type="select", value=config.sortby or "logdatetime", label="Sort By field", option={"logdatetime", "logdatetime DESC", "clientuserid", "clientuserid DESC", "clientip", "clientip DESC", "bytes", "bytes DESC", "score", "score DESC", "reason"} }) - 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.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"}) + result.auditstart = cfe({ value=config.auditstart or "", label="Audit Start Time", seq=1 }) + result.auditend = cfe({ value=config.auditend or "", label="Audit End Time", seq=2 }) + result.badyesno = cfe({ type="boolean", value=(config.badyesno == "1"), label="Display Suspect Records", descr="Show only records flagged as suspect on initial display", seq=3 }) + result.sortby = cfe({ type="select", value=config.sortby or "logdatetime", label="Sort By field", option={"logdatetime", "logdatetime DESC", "clientuserid", "clientuserid DESC", "clientip", "clientip DESC", "bytes", "bytes DESC", "score", "score DESC", "reason"}, seq=4 }) + result.minimumscore = cfe({ value=config.minimumscore or "0", label="Minimum Score", descr="Minimum Score to search for", seq=5 }) + result.window = cfe({ value=config.window or "5", label="Time Window", descr="Minutes of activity to display before and after selected block", seq=6 }) + result.watchdays = cfe({ value=config.watchdays or "14", label="Days to Watch", descr="Number of additional days to keep history for users in watchlist", seq=9 }) + result.purgedays = cfe({ value=config.purgedays or "30", label="Days before Purge", descr="Days to keep history, regardless of audit", seq=10 }) + 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", seq=7 }) + result.shortreason = cfe({ type="boolean", value=(config.shortreason == "true"), label="Short Reason", descr="Display a short reason (dansguardian only)", seq=8 }) + result.stoponerror = cfe({ type="boolean", value=(config.stoponerror == "true"), label="Stop on Error", descr="Stop import of logs if an error is encountered", seq=11}) return cfe({ type="group", value=result, label="Weblog Config" }) end |