~ubuntu-branches/ubuntu/trusty/ejabberd/trusty-proposed

« back to all changes in this revision

Viewing changes to src/ejabberd_admin.erl

  • Committer: Bazaar Package Importer
  • Author(s): Konstantin Khomoutov, Konstantin Khomoutov
  • Date: 2010-08-03 19:55:25 UTC
  • mfrom: (1.1.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20100803195525-dix2icz1w2fkew0n
Tags: 2.1.5-1
[ Konstantin Khomoutov ]
* New upstream release.
* Remove obsolete erlang-otp-r14-ssl.patch
* Refresh patches: reopen-log.patch, shared_roster_online.patch
  shared_roster_recent.patch
* Bump standards version to 3.9.0.
* Remove COPYING file installed by upstream Makefile
* Remove autogenerated src/ejabberd.init
* Add upstream patch fixing EJAB-1284 (closes: #591431).

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
 
100
100
     #ejabberd_commands{name = update_list, tags = [server],
101
101
                        desc = "List modified modules that can be updated",
102
 
                        module = ?MODULE, function = update_list_modified,
 
102
                        module = ?MODULE, function = update_list,
103
103
                        args = [],
104
104
                        result = {modules, {list, {module, string}}}},
105
105
     #ejabberd_commands{name = update, tags = [server],
106
106
                        desc = "Update the given module, or use the keyword: all",
107
107
                        module = ?MODULE, function = update,
108
108
                        args = [{module, string}],
109
 
                        result = {res, rescode}},
 
109
                        result = {res, restuple}},
110
110
 
111
111
     #ejabberd_commands{name = register, tags = [accounts],
112
112
                        desc = "Register a user",
305
305
 
306
306
update_module(ModuleNameString) ->
307
307
    ModuleName = list_to_atom(ModuleNameString),
308
 
    ejabberd_update:update([ModuleName]).
 
308
    case ejabberd_update:update([ModuleName]) of
 
309
          {ok, Res} -> {ok, io_lib:format("Updated: ~p", [Res])};
 
310
          {error, Reason} -> {error, Reason}
 
311
    end.
309
312
 
310
313
%%%
311
314
%%% Account management