]> granicus.if.org Git - ejabberd/commitdiff
* src/mod_privacy_odbc.erl: Support for privacy lists in MySQL (thanks to Igor Goryac...
authorJérôme Sautret <jerome.sautret@process-one.net>
Thu, 3 Jul 2008 16:20:47 +0000 (16:20 +0000)
committerJérôme Sautret <jerome.sautret@process-one.net>
Thu, 3 Jul 2008 16:20:47 +0000 (16:20 +0000)
SVN Revision: 1410

ChangeLog
src/mod_privacy_odbc.erl

index 68a0263aa9bffbfd23fe5861fff3e5134b90fadf..dc01031bb9e24aacbfc2187355efeb6c57a1cf44 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-03  Jérôme Sautret  <jerome.sautret@process-one.net>
+
+        * src/mod_privacy_odbc.erl: Support for privacy lists in MySQL
+               (thanks to Igor Goryachev)(EJAB-538)
+
 2008-07-03  Christophe Romain  <christophe.romain@process-one.net>
 
        * src/mod_pubsub/mod_pubsub.erl: Fix permission control on item
@@ -17,7 +22,7 @@
        to Kevin Crosbie); Fix forbidden result on setting
        affiliation/subscription
 
-       * src/ejabberd_local.erl: prevent iq_response table overload 
+       * src/ejabberd_local.erl: prevent iq_response table overload
        (EJAB-608)
        * src/mod_caps.erl: Likewise
 
@@ -27,7 +32,7 @@
        * src/ejabberd_sm.erl: Likewise
        * src/ejabberd_c2s.erl: Likewise
 
-       * src/web/ejabberd_http_poll.erl: Fixed HTTP headers when a 
+       * src/web/ejabberd_http_poll.erl: Fixed HTTP headers when a
        requested session doesn't exist (backport from trunk r1223)
 
 2008-06-29  Badlop  <badlop@process-one.net>
@@ -71,7 +76,7 @@
        * doc/guide.html: Regenerated with all the latest changes
 
 2008-06-12  Badlop  <badlop@process-one.net>
-       
+
        * doc/guide.tex: Permanent reference URL for sections (EJAB-651).
        Changes in CSS: verbatim text is indented and has grey background;
        descriptions are indented; table borders are softer. Fix
        * doc/webadmmainru.png: Likewise
 
        * doc/disco.png: Removed because not used
-       
+
        * doc/guide.tex: Fix Latex reference to webadmin section. Update
        explanation of screenshots. Update xmpp addresses of Mickael
        Remond and Sander Devrieze.
 
        * src/eldap.erl: Faster LDAP reconnection (Thanks to Christophe
        Romain) (EJAB-581)
-                                        
+
 2008-03-17  Mickael Remond  <mremond@process-one.net>
 
        * src/ejabberd_s2s.erl: Only trigger s2s_connect_hook on
        configuration sanity checks (EJAB-533)
        * src/src/ejabberd_app.erl: Likewise
        * src/ejabberd_app.erl: Likewise
-       
+
 2008-02-26  Badlop  <badlop@process-one.net>
 
        * src/msgs/it.msg: Updated (thanks to Smart2128)
        * src/msgs/no.msg: Updated (thanks to Stian B. Barmen)
        * src/msgs/pt-br.msg: Updated (thanks to Otavio Fernandes)
        * src/msgs/uk.msg: Updated (thanks to Stoune and Ruslan Rakhmanin)
-       
+
 2008-02-19  Christophe Romain <christophe.romain@process-one.net>
 
        * src/odbc/ejabberd_odbc.erl: add pgsql driver monitoring
        * src/ejabberd.hrl: Likewise
 
        * doc/introduction.tex: Updated to 22 languages
-       
+
        * doc/Makefile: Ensure that Bash is used
 
        * doc/guide.tex: Updated copyright dates to 2008.
index 8db812d0b1d78cd7bc0f7ce3cdb6ce744a56efe0..b4e267d28300b8de3451ee722e7c2d42213a107a 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
@@ -698,11 +698,11 @@ raw_to_item({SType, SValue, SAction, SOrder, SMatchAll, SMatchIQ,
            "d" -> deny
        end,
     Order = list_to_integer(SOrder),
-    MatchAll = SMatchAll == "t",
-    MatchIQ = SMatchIQ == "t",
-    MatchMessage = SMatchMessage == "t",
-    MatchPresenceIn = SMatchPresenceIn == "t",
-    MatchPresenceOut = SMatchPresenceOut == "t",
+    MatchAll = SMatchAll == "1" orelse SMatchAll == "t",
+    MatchIQ = SMatchIQ == "1" orelse SMatchIQ == "t" ,
+    MatchMessage =  SMatchMessage == "1" orelse SMatchMessage == "t",
+    MatchPresenceIn =  SMatchPresenceIn == "1" orelse SMatchPresenceIn == "t",
+    MatchPresenceOut =  SMatchPresenceOut == "1" orelse SMatchPresenceOut == "t",
     #listitem{type = Type,
              value = Value,
              action = Action,
@@ -750,11 +750,11 @@ item_to_raw(#listitem{type = Type,
            deny -> "d"
        end,
     SOrder = integer_to_list(Order),
-    SMatchAll = if MatchAll -> "t"; true -> "f" end,
-    SMatchIQ = if MatchIQ -> "t"; true -> "f" end,
-    SMatchMessage = if MatchMessage -> "t"; true -> "f" end,
-    SMatchPresenceIn = if MatchPresenceIn -> "t"; true -> "f" end,
-    SMatchPresenceOut = if MatchPresenceOut -> "t"; true -> "f" end,
+    SMatchAll = if MatchAll -> "1"; true -> "0" end,
+    SMatchIQ = if MatchIQ -> "1"; true -> "0" end,
+    SMatchMessage = if MatchMessage -> "1"; true -> "0" end,
+    SMatchPresenceIn = if MatchPresenceIn -> "1"; true -> "0" end,
+    SMatchPresenceOut = if MatchPresenceOut -> "1"; true -> "0" end,
     ["'", SType, "', "
      "'", SValue, "', "
      "'", SAction, "', "
@@ -871,6 +871,3 @@ sql_set_privacy_list(ID, RItems) ->
                             ") "
                             "values ('", ID, "', ", Items, ");"])
                  end, RItems).
-
-
-