25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-24 17:29:28 +01:00

* src/web/ejabberd_web_admin.erl: Code clean-up.

SVN Revision: 834
This commit is contained in:
Mickaël Rémond 2007-07-26 10:22:44 +00:00
parent eee30112ef
commit bf416ad52d
2 changed files with 4 additions and 7 deletions

View File

@ -1,5 +1,7 @@
2007-07-26 Mickael Remond <mickael.remond@process-one.net> 2007-07-26 Mickael Remond <mickael.remond@process-one.net>
* src/web/ejabberd_web_admin.erl: Code clean-up.
* src/mod_offline.erl: Code clean-up. * src/mod_offline.erl: Code clean-up.
* src/gen_mod.erl: Throw error more cleanly. * src/gen_mod.erl: Throw error more cleanly.

View File

@ -1589,7 +1589,6 @@ user_queue(User, Server, Query, Lang) ->
[us_to_list(US)]))] ++ [us_to_list(US)]))] ++
case Res of case Res of
ok -> [?CT("Submitted"), ?P]; ok -> [?CT("Submitted"), ?P];
error -> [?CT("Bad format"), ?P];
nothing -> [] nothing -> []
end ++ end ++
[?XAE("form", [{"action", ""}, {"method", "post"}], [?XAE("form", [{"action", ""}, {"method", "post"}],
@ -1953,7 +1952,7 @@ get_node(global, Node, ["db"], Query, Lang) ->
{badrpc, _Reason} -> {badrpc, _Reason} ->
[?XCT("h1", "RPC Call Error")]; [?XCT("h1", "RPC Call Error")];
Tables -> Tables ->
Res = node_db_parse_query(Node, Tables, Query), node_db_parse_query(Node, Tables, Query),
STables = lists:sort(Tables), STables = lists:sort(Tables),
Rows = lists:map( Rows = lists:map(
fun(Table) -> fun(Table) ->
@ -1990,11 +1989,7 @@ get_node(global, Node, ["db"], Query, Lang) ->
]) ])
end, STables), end, STables),
[?XC("h1", ?T("Database Tables at ") ++ atom_to_list(Node))] ++ [?XC("h1", ?T("Database Tables at ") ++ atom_to_list(Node))] ++
case Res of [?CT("Submitted"), ?P] ++
ok -> [?CT("Submitted"), ?P];
error -> [?CT("Bad format"), ?P];
nothing -> []
end ++
[?XAE("form", [{"action", ""}, {"method", "post"}], [?XAE("form", [{"action", ""}, {"method", "post"}],
[?XAE("table", [], [?XAE("table", [],
[?XE("thead", [?XE("thead",