Fixed processes display in core except modules/display_processes.lua
This commit is contained in:
@ -169,7 +169,14 @@ function modpol.interactions.org_dashboard(user, org_string)
|
||||
table.sort(modules)
|
||||
|
||||
-- list pending
|
||||
local process_msg = #org.processes .. " total processes"
|
||||
local processes = {}
|
||||
for i,v in ipairs(org.processes) do
|
||||
if v ~= "deleted" then
|
||||
processes[i] = org.processes[v]
|
||||
end
|
||||
end
|
||||
|
||||
local process_msg = #processes .. " total processes"
|
||||
if org.pending[user] then
|
||||
process_msg = process_msg .. " (" ..
|
||||
modpol.util.num_pairs(org.pending[user]) .. " pending)"
|
||||
@ -223,20 +230,17 @@ function modpol.interactions.org_dashboard(user, org_string)
|
||||
print("Error: Module not found.")
|
||||
modpol.interactions.org_dashboard(user, org.id)
|
||||
end
|
||||
|
||||
elseif sel == 'p' or sel == 'P' then
|
||||
local processes = {}
|
||||
|
||||
elseif sel == 'p' or sel == 'P' then -- Pending processes
|
||||
print("All processes: (* indicates pending)")
|
||||
for i,v in ipairs(org.processes) do
|
||||
if v ~= "deleted" then
|
||||
local active = ''
|
||||
if org.pending[user] then
|
||||
if org.pending[user][v.id] then
|
||||
active = '*'
|
||||
end
|
||||
for i,v in ipairs(processes) do
|
||||
local active = ''
|
||||
if org.pending[user] then
|
||||
if org.pending[user][v.id] then
|
||||
active = '*'
|
||||
end
|
||||
print("["..v.id.."] "..v.slug..active)
|
||||
end
|
||||
print("["..v.id.."] "..v.slug..active)
|
||||
end
|
||||
print()
|
||||
print("Interact with which one (use [id] number)?")
|
||||
|
Reference in New Issue
Block a user