[sork] vacation, xml-config and realm

Martin Luethi horde at humbapa.ch
Mon Jan 26 04:50:46 PST 2004


attached is a small-patch who fixes that in vacation/main.php

I also changed the realm-detection code to fallback to 'default'
if the realm was not found in the config

g. martin luethi


Mon, 26 Jan 2004 13:28:26 +0100 Jan Schneider <jan at horde.org>:

> Zitat von Martin Luethi <horde at humbapa.ch>:
>
>> hi list,
>>
>> since the config was switched to xml I can't use the "default" config
>> anymore.
>>
>> I use the "Exim mailer based SQL driver" with "Custom parameters".
>> when I access vacation I got the following error (see attachment
>> for full output):
>> A fatal error has occurred
>> Required 'table' not specified in vacation authentication SQL configuration.
>> The file /httproot/_mail/horde/config/../vacation/config/conf.php should
>> contain a $conf['server']['params']['table'] setting.
>>
>> the table-setting is there, but under $conf['server']['params']['default']
>> ['table']...
>>
>> I think there should be a section in vacation/main.php or
>> vacation/lib/Driver.php who checks the realm and then cleans up this config-
>> array ($conf['server']).
>
> Indeed. I didn't even notice that the sql configuration is different from
> the other backends and am a bit confused now why this is the case.
>
>> is anybody working at this right now?
>
> Not that I know of.
>
> Jan.
>
> --
> http://www.horde.org - The Horde Project
> http://www.ammma.de - Neue Wege des Lernens
> http://www.tip4all.de - Deine private Tippgemeinschaft
> --
> Sork mailing list - Join the hunt: http://horde.org/bounties/#sork
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: sork-unsubscribe at lists.horde.org

-------------- next part --------------
Index: main.php
===================================================================
RCS file: /repository/vacation/main.php,v
retrieving revision 1.38
diff -u -r1.38 main.php
--- main.php    17 Jan 2004 22:57:49 -0000      1.38
+++ main.php    26 Jan 2004 12:49:23 -0000
@@ -19,8 +19,13 @@
 $split = explode('@', Auth::getAuth());
 $user = @$split[0];
 $realm = @$split[1];
-if (empty($realm)) {
+if (empty($realm) || empty($driver->params["$realm"])) {
     $realm = 'default';
+}
+
+// Merge driver-parameters
+if (@is_array($driver->params["$realm"])) {
+    $driver->params = array_merge($driver->params, $driver->params["$realm"]);
 }

 $submit = Util::getFormData('submit', false);


More information about the sork mailing list