gunnar: server/kolab-webclient/patches/1.2.0/KOLAB t_turba_HK_GW_AllowAttributeDefaults.diff, NONE, 1.1 series, 1.5, 1.6

cvs at kolab.org cvs at kolab.org
Sun Apr 26 13:39:07 CEST 2009


Author: gunnar

Update of /kolabrepository/server/kolab-webclient/patches/1.2.0/KOLAB
In directory doto:/tmp/cvs-serv7232/kolab-webclient/patches/1.2.0/KOLAB

Modified Files:
	series 
Added Files:
	t_turba_HK_GW_AllowAttributeDefaults.diff 
Log Message:
Merge the patch for issue 3439 into the kolab-webclient patch queue.

--- NEW FILE: t_turba_HK_GW_AllowAttributeDefaults.diff ---
From: Gunnar Wrobel <p at rdus.de>
Subject: [PATCH] t/turba/HK/GW/AllowAttributeDefaults

Allow attribute default values for the turba source configuration.

kolab/issue3439 (FreeBusy display in web client and fbview depends on kolabHomeServer in LDAP)

ISSUE: https://www.intevation.de/roundup/kolab/issue3439

STATUS: SUBMIT

Signed-off-by: Gunnar Wrobel <p at rdus.de>

---
 horde-webmail/turba/config/sources.php |    3 ++-
 horde-webmail/turba/lib/Object.php     |    6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/horde-webmail/turba/config/sources.php b/horde-webmail/turba/config/sources.php
index d6acb36..ec46b43 100644
--- a/horde-webmail/turba/config/sources.php
+++ b/horde-webmail/turba/config/sources.php
@@ -332,7 +332,8 @@ if (!empty($GLOBALS['conf']['kolab']['enabled'])) {
                 'notes'             => 'description',
                 'kolabHomeServer'   => 'kolabHomeServer',
                 'freebusyUrl'       => array('fields' => array('kolabHomeServer', 'email'),
-                                             'format' => 'https://%s/freebusy/%s.xfb'),
+                                             'format' => 'https://%s/freebusy/%s.xfb',
+                                             'defaults' => array('kolabHomeServer' => $GLOBALS['conf']['kolab']['imap']['server'])),
             ),
             'search' => array(
                 'name',
diff --git a/horde-webmail/turba/lib/Object.php b/horde-webmail/turba/lib/Object.php
index 57c9368..68b537d 100644
--- a/horde-webmail/turba/lib/Object.php
+++ b/horde-webmail/turba/lib/Object.php
@@ -115,7 +115,11 @@ class Turba_Object {
             is_array($this->driver->map[$attribute])) {
             $args = array();
             foreach ($this->driver->map[$attribute]['fields'] as $field) {
-                $args[] = $this->getValue($field);
+                $value = $this->getValue($field);
+                if (empty($value) && isset($this->driver->map[$attribute]['defaults'][$field])) {
+                    $value = $this->driver->map[$attribute]['defaults'][$field];
+                }
+                $args[] = $value;
             }
             return trim(vsprintf($this->driver->map[$attribute]['format'], $args), " \t\n\r\0\x0B,");
         } elseif (!isset($this->attributes[$attribute])) {
-- 
tg: (d84b81d..) t/turba/HK/GW/AllowAttributeDefaults (depends on: t/Kolab_Storage/HK/GW/TestingFixes)
-- 
TOPGIT patch commit log
=======================

commit d3e51ed7f0eb792de6a84975e6ae51199ed1b7cb
Author: Gunnar Wrobel <p at rdus.de>
Date:   Sun Apr 26 12:55:30 2009 +0200

    Allow attribute default values for the turba source configuration.
    
    kolab/issue3439 (FreeBusy display in web client and fbview depends on kolabHomeServer in LDAP)
    
    ISSUE: https://www.intevation.de/roundup/kolab/issue3439

Index: series
===================================================================
RCS file: /kolabrepository/server/kolab-webclient/patches/1.2.0/KOLAB/series,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- series	26 Apr 2009 08:34:50 -0000	1.5
+++ series	26 Apr 2009 11:39:05 -0000	1.6
@@ -82,3 +82,4 @@
 t_pear_HK_GW_AddNetLDAP2__.diff
 t_Kolab__Server_HK_GW_MappableAttributes__.diff
 t_Kolab__Storage_HK_GW_TestingFixes.diff
+t_turba_HK_GW_AllowAttributeDefaults.diff





More information about the commits mailing list