24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-14 22:00:16 +02:00

Small relax the limitation in the mod_pubsub_odbc host option.

SVN Revision: 2780
This commit is contained in:
Badlop 2009-12-04 16:07:43 +00:00
parent 2c1b8b0930
commit c3df4f3eb0
4 changed files with 6 additions and 4 deletions

View File

@ -2717,7 +2717,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.

View File

@ -3479,7 +3479,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.

View File

@ -3630,7 +3630,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)->

View File

@ -812,7 +812,7 @@
+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)->