aboutsummaryrefslogtreecommitdiff
path: root/abrechenbarkeit.lua
diff options
context:
space:
mode:
Diffstat (limited to 'abrechenbarkeit.lua')
-rwxr-xr-xabrechenbarkeit.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/abrechenbarkeit.lua b/abrechenbarkeit.lua
index b7636a1..b7ec392 100755
--- a/abrechenbarkeit.lua
+++ b/abrechenbarkeit.lua
@@ -584,7 +584,7 @@ local function r_users(show_special, filter_negative)
local is_spu = user.name:sub(1, 1) == "@"
local filter_out = query.prefix ~= nil and user.name:sub(1, 1):lower() ~= query.prefix
if (filter_negative ~= nil and user.balance < filter_negative)
- or (filter_negative == nil and is_spu == show_special and not filter_out) then
+ or (filter_negative == nil and is_spu == show_special and (not filter_out)) then
print(format([[<li>
<a href="/{username_url}">
<span class="name">{!username}</span>
@@ -599,9 +599,10 @@ local function r_users(show_special, filter_negative)
end
local inactive_cutoff = os.time() - (tonumber(config.inactive_cutoff) or (30 * 24 * 60 * 60))
for _, user in ipairs(get_active_users()) do
- if user.time > inactive_cutoff then show_user(user) end
+ if filter_negative or user.time > inactive_cutoff then show_user(user) end
end
print("</ul>")
+ if filter_negative ~= nil then return end
print(format([[<details><summary>{+users.inactive_list}</summary><ul class="userlist">]]))
for _, user in ipairs(users) do
if user.time <= inactive_cutoff then show_user(user) end
@@ -802,8 +803,7 @@ if path == "/" then
elseif query.users and query.export then
return r_export_balances()
else
- return r_users(false, query.negative)
- -- tonumber(query.negative or 0) or nil)
+ return r_users(false, query.negative and (query.maximum or 0))
end
else
local username = extract_username()