]> granicus.if.org Git - ejabberd/commitdiff
Small relax the limitation in the mod_pubsub_odbc host option.
authorBadlop <badlop@process-one.net>
Fri, 4 Dec 2009 16:08:31 +0000 (16:08 +0000)
committerBadlop <badlop@process-one.net>
Fri, 4 Dec 2009 16:08:31 +0000 (16:08 +0000)
SVN Revision: 2781

doc/guide.html
doc/guide.tex
src/mod_pubsub/mod_pubsub_odbc.erl
src/mod_pubsub/pubsub_odbc.patch

index 4a2bfd22b3e151143a053de543f4538fed45c0df..1a56ae7a4a75af32c0ff43338a4ae69703fdae06 100644 (file)
@@ -2797,7 +2797,8 @@ service. If the <TT>host</TT> option is not specified, the Jabber ID will be the
 hostname of the virtual host with the prefix &#X2018;<TT>pubsub.</TT>&#X2019;. The keyword "@HOST@"
 is replaced at start time with the real virtual host name.
 
-If you use <TT>mod_pubsub_odbc</TT>, you can only use the prefix &#X2018;<TT>pubsub.</TT>&#X2019;.
+If you use <TT>mod_pubsub_odbc</TT>, please ensure the prefix contains only one dot,
+for example &#X2018;<TT>pubsub.</TT>&#X2019;, or &#X2018;<TT>publish.</TT>&#X2019;,.
 </DD><DT CLASS="dt-description"><B><TT>{access_createnode, AccessName}</TT></B></DT><DD CLASS="dd-description"> 
 This option restricts which users are allowed to create pubsub nodes using
 ACL and ACCESS.
index d8f7b2a5d6fd10db4afa43835b7d409ce695cbc3..d2ddeda7e851a817d363d0c073f41ff76da29c4d 100644 (file)
@@ -3573,7 +3573,8 @@ and it requires \modcaps{}.
 Options:
 \begin{description}
 \hostitem{pubsub}
-  If you use \modpubsubodbc, you can only use the prefix `\jid{pubsub.}'.
+  If you use \modpubsubodbc, please ensure the prefix contains only one dot,
+  for example `\jid{pubsub.}', or `\jid{publish.}',.
 \titem{\{access\_createnode, AccessName\}} \ind{options!access\_createnode}
   This option restricts which users are allowed to create pubsub nodes using
   ACL and ACCESS.
index 910ceda2e04ebb4916bb252cb21e7c04070e8b2a..0cbcdf38fa1dda0dc9ac8a8d7d63cff8cfe74f80 100644 (file)
@@ -3557,7 +3557,7 @@ transaction_retry(Host, Fun, Trans, Count) ->
 odbc_conn({_U, Host, _R})->
     Host;
 odbc_conn(Host) ->
-    Host--"pubsub.".  %% TODO, improve that for custom host
+    lists:dropwhile(fun(A) -> A/=$. end, Host) -- ".".
 
 %% escape value for database storage
 escape({_U, _H, _R}=JID)->
index 9bd66e4f24eab10d729ae6d19f900951e8928577..5d73dd1ba676cc75718f4b6928e2f26307a3fe80 100644 (file)
 +odbc_conn({_U, Host, _R})->
 +    Host;
 +odbc_conn(Host) ->
-+    Host--"pubsub.".  %% TODO, improve that for custom host
++    lists:dropwhile(fun(A) -> A/=$. end, Host) -- ".".
 +
 +%% escape value for database storage
 +escape({_U, _H, _R}=JID)->