]> granicus.if.org Git - ejabberd/commitdiff
Merge commit 1612 from trunk:
authorJérôme Sautret <jerome.sautret@process-one.net>
Tue, 7 Oct 2008 12:34:23 +0000 (12:34 +0000)
committerJérôme Sautret <jerome.sautret@process-one.net>
Tue, 7 Oct 2008 12:34:23 +0000 (12:34 +0000)
* src/mod_roster_odbc.erl: fix MySQL multiple requests issue.

SVN Revision: 1613

ChangeLog
src/mod_roster_odbc.erl

index 5a605f8411d242c28fc81b1c3c112ca324e439c7..8b55a35aaecc98f889d6facd549e666e298e7b7f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-10-07  Jerome Sautret  <jerome.sautret@process-one.net>
+
+       * src/mod_roster_odbc.erl: fix MySQL multiple requests issue.
+
 2008-10-06  Badlop  <badlop@process-one.net>
 
        * doc/guide.html: Regenerated
index 4439db30f768468c09f40f26c462e5cb2028f053..ad6c7043e5880bae8c7059f193c513c387f6e6e3 100644 (file)
@@ -16,7 +16,7 @@
 %%% but WITHOUT ANY WARRANTY; without even the implied warranty of
 %%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 %%% General Public License for more details.
-%%%                         
+%%%
 %%% You should have received a copy of the GNU General Public License
 %%% along with this program; if not, write to the Free Software
 %%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
@@ -680,7 +680,7 @@ set_items(User, Server, SubEl) ->
     LServer = jlib:nameprep(Server),
     catch odbc_queries:sql_transaction(
            LServer,
-            lists:map(fun(El) ->
+            lists:flatmap(fun(El) ->
                               process_item_set_t(LUser, LServer, El)
                       end, Els)).
 
@@ -913,7 +913,7 @@ groups_to_string(#roster{us = {User, _Server},
     %% Empty groups do not need to be converted to string to be inserted in
     %% the database
     lists:foldl(fun([], Acc) -> Acc;
-                  (Group, Acc) -> 
+                  (Group, Acc) ->
                        String = ["'", Username, "',"
                                  "'", SJID, "',"
                                  "'", ejabberd_odbc:escape(Group), "'"],
@@ -1079,4 +1079,3 @@ us_to_list({User, Server}) ->
 
 webadmin_user(Acc, _User, _Server, Lang) ->
     Acc ++ [?XE("h3", [?ACT("roster/", "Roster")])].
-