summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-11-09 21:18:53 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-11-09 21:18:53 +0000
commit2859a6659ff53affa326bd55a9a2971a414657b7 (patch)
tree0181715e454ab5cecc9f1c38336586309680fb57 /plugins
parent5d682f384cef41e36829c557bb1d59a5b7ebf702 (diff)
Bugfix: always create a valid result set when reading a single record
git-svn-id: https://svn.roundcube.net/trunk@4206 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/kolab_addressbook/rcube_kolab_contacts.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/kolab_addressbook/rcube_kolab_contacts.php b/plugins/kolab_addressbook/rcube_kolab_contacts.php
index 54effa63c..b76d39aae 100644
--- a/plugins/kolab_addressbook/rcube_kolab_contacts.php
+++ b/plugins/kolab_addressbook/rcube_kolab_contacts.php
@@ -189,13 +189,10 @@ class rcube_kolab_contacts extends rcube_addressbook
public function get_record($id, $assoc=false)
{
$this->_fetch_data();
- if ($this->contacts[$id] && $assoc) {
- return $this->contacts[$id];
- }
- else if ($this->contacts[$id]) {
+ if ($this->contacts[$id]) {
$this->result = new rcube_result_set(1);
$this->result->add($this->contacts[$id]);
- return $this->result;
+ return $assoc ? $this->contacts[$id] : $this->result;
}
return false;