Software /
code /
prosody-modules
Changeset
250:67f03b7786af
mod_adhoc: Fix dataform creation
mod_adhoc_cmd_admin, mod_adhoc_cmd_modules: adapt to work with fixed mod_adhoc
author | Florian Zeitz <florob@babelmonkeys.de> |
---|---|
date | Wed, 01 Sep 2010 22:42:58 +0200 |
parents | 249:50c4348c2494 |
children | 251:d36160f4961f |
files | mod_adhoc/adhoc/adhoc.lib.lua mod_adhoc_cmd_admin/mod_adhoc_cmd_admin.lua mod_adhoc_cmd_modules/mod_adhoc_cmd_modules.lua |
diffstat | 3 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_adhoc/adhoc/adhoc.lib.lua Sat Aug 28 22:19:54 2010 +0400 +++ b/mod_adhoc/adhoc/adhoc.lib.lua Wed Sep 01 22:42:58 2010 +0200 @@ -69,9 +69,9 @@ end cmdtag:add_child(actions); elseif name == "form" then - cmdtag:add_child((content.layout or content):form(content.data)); + cmdtag:add_child((content.layout or content):form(content.values)); elseif name == "result" then - cmdtag:add_child((content.layout or content):form(content.data, "result")); + cmdtag:add_child((content.layout or content):form(content.values, "result")); elseif name == "other" then cmdtag:add_child(content); end
--- a/mod_adhoc_cmd_admin/mod_adhoc_cmd_admin.lua Sat Aug 28 22:19:54 2010 +0400 +++ b/mod_adhoc_cmd_admin/mod_adhoc_cmd_admin.lua Wed Sep 01 22:42:58 2010 +0200 @@ -286,7 +286,7 @@ else return { status = "completed", error = { message = "User does not exist" } }; end - return { status = "completed", result = { layout = get_user_password_result_layout, data = {accountjid = accountjid, password = password} } }; + return { status = "completed", result = { layout = get_user_password_result_layout, values = {accountjid = accountjid, password = password} } }; else return { status = "executing", form = get_user_password_layout }, "executing"; end @@ -370,7 +370,7 @@ resources = resources .. "\n" .. resource; IPs = IPs .. "\n" .. session.ip; end - return { status = "completed", result = {layout = get_user_stats_result_layout, data = {ipaddresses = IPs, rostersize = tostring(rostersize), + return { status = "completed", result = {layout = get_user_stats_result_layout, values = {ipaddresses = IPs, rostersize = tostring(rostersize), onlineresources = resources}} }; else return { status = "executing", form = get_user_stats_layout }, "executing"; @@ -412,7 +412,7 @@ end end end - return { status = "completed", result = {layout = get_online_users_result_layout, data = {onlineuserjids=t_concat(users, "\n")}} }; + return { status = "completed", result = {layout = get_online_users_result_layout, values = {onlineuserjids=t_concat(users, "\n")}} }; else return { status = "executing", form = get_online_users_layout }, "executing"; end
--- a/mod_adhoc_cmd_modules/mod_adhoc_cmd_modules.lua Sat Aug 28 22:19:54 2010 +0400 +++ b/mod_adhoc_cmd_modules/mod_adhoc_cmd_modules.lua Wed Sep 01 22:42:58 2010 +0200 @@ -25,7 +25,7 @@ local modules = array.collect(keys(hosts[data.to].modules)):sort():concat("\n"); - return { status = "completed", result = { layout = result; data = { modules = modules } } }; + return { status = "completed", result = { layout = result; values = { modules = modules } } }; end function load_module_handler(self, data, state) @@ -90,7 +90,7 @@ end else local modules = array.collect(keys(hosts[data.to].modules)):sort(); - return { status = "executing", form = { layout = layout; data = { module = modules } } }, "executing"; + return { status = "executing", form = { layout = layout; values = { module = modules } } }, "executing"; end end @@ -122,7 +122,7 @@ end else local modules = array.collect(keys(hosts[data.to].modules)):sort(); - return { status = "executing", form = { layout = layout; data = { module = modules } } }, "executing"; + return { status = "executing", form = { layout = layout; values = { module = modules } } }, "executing"; end end