Skip to content

Commit

Permalink
Don't require updated Kolab_Storage, perform interface check.
Browse files Browse the repository at this point in the history
Code will work as before improved history system support was added.
  • Loading branch information
mrubinsk committed Sep 7, 2015
1 parent 493d8ef commit 602da13
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions framework/Core/lib/Horde/Core/Factory/KolabStorage.php
Expand Up @@ -133,11 +133,14 @@ public function create()
);

// Check if the history system is enabled
try {
$history = $this->_injector->getInstance('Horde_History');
$params['history'] = $history;
$params['history_prefix_generator'] = new Horde_Core_Kolab_Storage_HistoryPrefix();
} catch(Horde_Exception $e) {
// @todo remove interface_exists check in H6.
if (interface_exists('Horde_Kolab_Storage_HistoryPrefix')) {
try {
$history = $this->_injector->getInstance('Horde_History');
$params['history'] = $history;
$params['history_prefix_generator'] = new Horde_Core_Kolab_Storage_HistoryPrefix();
} catch(Horde_Exception $e) {
}
}

if (!empty($configuration['strategy'])) {
Expand Down
2 changes: 1 addition & 1 deletion framework/Core/package.xml
Expand Up @@ -1390,7 +1390,7 @@
<package>
<name>Horde_Kolab_Storage</name>
<channel>pear.horde.org</channel>
<min>2.2.0</min>
<min>2.0.0</min>
<max>3.0.0alpha1</max>
<exclude>3.0.0alpha1</exclude>
</package>
Expand Down

0 comments on commit 602da13

Please sign in to comment.