Skip to content

Commit

Permalink
Add config switch to select the desired sync strategy for Kolab_Storage.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Jun 16, 2015
1 parent 32e78c8 commit dacab9f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions framework/Core/lib/Horde/Core/Factory/KolabStorage.php
Expand Up @@ -118,6 +118,14 @@ public function create()
} catch(Horde_Exception $e) {
}

if (!empty($configuration['strategy'])) {
$classname = 'Horde_Kolab_Storage_Synchronization_' . basename($configuration['strategy']);
if (!class_exists($classname)) {
throw new Horde_Excecption(sprintf('Class %s not found.', $classname));
}
$params['sync_strategy'] = new $classname();
}

$factory = new Horde_Kolab_Storage_Factory($params);
return $factory->create();
}
Expand Down
10 changes: 10 additions & 0 deletions horde/config/conf.xml
Expand Up @@ -1943,6 +1943,16 @@
maildomain">example.com</configstring>
<configboolean name="cache_folders" desc="Cache IMAP folders?"
required="true">true</configboolean>
<configenum name="strategy" desc="The synchronization strategy to use. This
determines how often the local cache is synchronized against the IMAP
server. If you have a CONDSTORE and QRESYNC capable IMAP server you should
choose 'Token'.">Token
<values>
<value>Token</value>
<value>OncePerSession</value>
<value>TimeBased</value>
</values>
</configenum>
</case>
</configswitch>
</configsection>
Expand Down

0 comments on commit dacab9f

Please sign in to comment.