File HK-GW-turba_2.2_RC1-Fix_share_id_change.patch of Package horde3-turba

This fixes a problem with the way the Kolab share driver handles ids.

diff -r 0ffb2574c923 turba/lib/Turba.php
--- a/turba/lib/Turba.php	Wed Nov 28 17:04:21 2007 +0100
+++ b/turba/lib/Turba.php	Wed Nov 28 17:23:14 2007 +0100
@@ -439,7 +439,7 @@ class Turba {
 
                         $source_config = $sources[$source];
                         $source_config['params']['share'] = &$share;
-                        $sources[$sourceKey] = $source_config;
+                        $sources[$share->getId()] = $source_config;
                     } else {
                         $notification->push($driver, 'horde.error');
                     }
@@ -564,7 +564,7 @@ class Turba {
         /* Add the new addressbook to the user's list of visible
          * address books. */
         $prefs = explode("\n", $GLOBALS['prefs']->getValue('addressbooks'));
-        if (array_search($share_id, $prefs) === false) {
+        if (array_search($share->getId(), $prefs) === false) {
             $GLOBALS['prefs']->setValue('addressbooks', $GLOBALS['prefs']->getValue('addressbooks') . "\n" . $share_id);
         }
         return $share;
openSUSE Build Service is sponsored by