25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Fix: update sql statement, added missing delimeter for sql queries

This commit is contained in:
Lamtei W 2017-05-08 13:21:12 +05:30 committed by Badlop
parent a0908ba393
commit cd18d3d8a7
2 changed files with 3 additions and 3 deletions

View File

@ -193,7 +193,7 @@ export(_Server) ->
SAlways = misc:term_to_expr(Always), SAlways = misc:term_to_expr(Always),
SNever = misc:term_to_expr(Never), SNever = misc:term_to_expr(Never),
[?SQL("insert into archive_prefs (username, def, always, never) values" [?SQL("insert into archive_prefs (username, def, always, never) values"
"(%(LUser)s, %(SDefault)s, %(SAlways)s, %(SNever)s)")]; "(%(LUser)s, %(SDefault)s, %(SAlways)s, %(SNever)s);")];
(_Host, _R) -> (_Host, _R) ->
[] []
end}, end},
@ -217,7 +217,7 @@ export(_Server) ->
"peer, bare_peer, xml, txt, kind, nick) " "peer, bare_peer, xml, txt, kind, nick) "
"values (%(SUser)s, %(TStmp)d, %(LPeer)s, " "values (%(SUser)s, %(TStmp)d, %(LPeer)s, "
"%(BarePeer)s, %(XML)s, %(Body)s, %(SType)s, " "%(BarePeer)s, %(XML)s, %(Body)s, %(SType)s, "
"%(Nick)s)")]; "%(Nick)s);")];
(_Host, _R) -> (_Host, _R) ->
[] []
end}]. end}].

View File

@ -385,7 +385,7 @@ update_roster_sql({LUser, SJID, Name, SSubscription, SAsk, AskMessage},
" username=%(LUser)s and jid=%(SJID)s;")] " username=%(LUser)s and jid=%(SJID)s;")]
++ ++
[?SQL("insert into rostergroups(username, jid, grp) " [?SQL("insert into rostergroups(username, jid, grp) "
"values (%(LUser)s, %(SJID)s, %(ItemGroup)s)") "values (%(LUser)s, %(SJID)s, %(ItemGroup)s);")
|| ItemGroup <- ItemGroups]. || ItemGroup <- ItemGroups].
roster_subscribe({LUser, SJID, Name, SSubscription, SAsk, AskMessage}) -> roster_subscribe({LUser, SJID, Name, SSubscription, SAsk, AskMessage}) ->