Always fetch the full result in kolab_storage_cache::select
The previous behaviour did not work in the addressbook if more than 500 results were provided, because nothing turned the uid only fetch into the full data, resulting in "empty" result records. This solution seems to work fine for the cases tested and avoids having to completely different codepaths based on a number of records found.
This commit is contained in:
parent
68eaf60aca
commit
f3592eaf3b
1 changed files with 2 additions and 3 deletions
|
@ -25,7 +25,6 @@
|
|||
class kolab_storage_cache
|
||||
{
|
||||
const DB_DATE_FORMAT = 'Y-m-d H:i:s';
|
||||
const MAX_RECORDS = 500;
|
||||
|
||||
protected $db;
|
||||
protected $imap;
|
||||
|
@ -778,8 +777,8 @@ class kolab_storage_cache
|
|||
if ($this->ready) {
|
||||
$this->_read_folder_data();
|
||||
|
||||
// fetch full object data on one query if a small result set is expected
|
||||
$fetchall = !$uids && ($this->limit ? $this->limit[0] : ($count = $this->count($query))) < self::MAX_RECORDS;
|
||||
// fetch full object data unless only uids are requested
|
||||
$fetchall = !$uids;
|
||||
|
||||
// skip SELECT if we know it will return nothing
|
||||
if ($count === 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue