summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-02-06 16:31:42 (GMT)
committerThomas Bruederli <thomas@roundcube.net>2014-02-06 16:31:42 (GMT)
commit78a7047f1837b7c78ea8c6b39382d63ecd255627 (patch)
tree0a94d85944fda7b8feb63486651d3897b43ee826
parent5d2ced66c609913f5d54143ac9b4f50ce0b6c7b8 (diff)
downloadiRony-78a7047f1837b7c78ea8c6b39382d63ecd255627.tar.gz
Adapt to kolab_storage_folder optimizations: don't cast resultset into array (#2827)
-rw-r--r--lib/Kolab/CalDAV/CalendarBackend.php4
-rw-r--r--lib/Kolab/CardDAV/ContactsBackend.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Kolab/CalDAV/CalendarBackend.php b/lib/Kolab/CalDAV/CalendarBackend.php
index ba4f658..122ee01 100644
--- a/lib/Kolab/CalDAV/CalendarBackend.php
+++ b/lib/Kolab/CalDAV/CalendarBackend.php
@@ -289,7 +289,7 @@ class CalendarBackend extends CalDAV\Backend\AbstractBackend
$events = array();
$storage = $this->get_storage_folder($calendarId);
if ($storage) {
- foreach ((array)$storage->select($query) as $event) {
+ foreach ($storage->select($query) as $event) {
$events[] = array(
'id' => $event['uid'],
'uri' => $event['uid'] . '.ics',
@@ -578,7 +578,7 @@ class CalendarBackend extends CalDAV\Backend\AbstractBackend
$results = array();
if ($storage = $this->get_storage_folder($calendarId)) {
- foreach ((array)$storage->select($query) as $event) {
+ foreach ($storage->select($query) as $event) {
// TODO: cache the already fetched events in memory (really?)
$results[] = $event['uid'] . '.ics';
}
diff --git a/lib/Kolab/CardDAV/ContactsBackend.php b/lib/Kolab/CardDAV/ContactsBackend.php
index e277077..5d85b7d 100644
--- a/lib/Kolab/CardDAV/ContactsBackend.php
+++ b/lib/Kolab/CardDAV/ContactsBackend.php
@@ -283,7 +283,7 @@ class ContactsBackend extends CardDAV\Backend\AbstractBackend
$query = array(array('type', '=', $groups_support ? array('contact','distribution-list') : 'contact'));
$cards = array();
if ($storage = $this->get_storage_folder($addressBookId)) {
- foreach ((array)$storage->select($query) as $contact) {
+ foreach ($storage->select($query) as $contact) {
$cards[] = array(
'id' => $contact['uid'],
'uri' => $contact['uid'] . '.vcf',