Skip to content

Commit

Permalink
Don't create a driver if we know we have no available calendars for it.
Browse files Browse the repository at this point in the history
Fixes Bug: 12870
  • Loading branch information
mrubinsk committed Dec 6, 2013
1 parent c1af69c commit df0adc7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kronolith/lib/Kronolith.php
Expand Up @@ -138,7 +138,9 @@ static public function search($query, $calendar = null)

$events = array();
foreach ($calendars as $type => $list) {
$kronolith_driver = self::getDriver($type);
if (!empty($list)) {
$kronolith_driver = self::getDriver($type);
}
foreach ($list as $cal) {
$kronolith_driver->open($cal);
$retevents = $kronolith_driver->search($query);
Expand Down

0 comments on commit df0adc7

Please sign in to comment.