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

Small relax the limitation in the mod_pubsub_odbc host option.

SVN Revision: 2781
This commit is contained in:
Badlop 2009-12-04 16:08:31 +00:00
parent 3658da3ae8
commit 5a006b977d
4 changed files with 6 additions and 4 deletions

View 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@" 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. 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"> </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 This option restricts which users are allowed to create pubsub nodes using
ACL and ACCESS. ACL and ACCESS.

View File

@ -3573,7 +3573,8 @@ and it requires \modcaps{}.
Options: Options:
\begin{description} \begin{description}
\hostitem{pubsub} \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} \titem{\{access\_createnode, AccessName\}} \ind{options!access\_createnode}
This option restricts which users are allowed to create pubsub nodes using This option restricts which users are allowed to create pubsub nodes using
ACL and ACCESS. ACL and ACCESS.

View File

@ -3557,7 +3557,7 @@ transaction_retry(Host, Fun, Trans, Count) ->
odbc_conn({_U, Host, _R})-> odbc_conn({_U, Host, _R})->
Host; Host;
odbc_conn(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 value for database storage
escape({_U, _H, _R}=JID)-> escape({_U, _H, _R}=JID)->

View File

@ -760,7 +760,7 @@
+odbc_conn({_U, Host, _R})-> +odbc_conn({_U, Host, _R})->
+ Host; + Host;
+odbc_conn(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 value for database storage
+escape({_U, _H, _R}=JID)-> +escape({_U, _H, _R}=JID)->