summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-05-21 19:48:16 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-05-21 19:48:16 +0200
commit939380da27f3502847fc1f18e8b67f3fb6d6742f (patch)
tree7559dce5d74579bb07a9265233cee3cf74212814 /program
parent5793309478b60b3f30aea191ec2f46b944584afa (diff)
Don't list empty (nil) metadata entries to save memory anc caching space
Diffstat (limited to 'program')
-rw-r--r--program/lib/Roundcube/rcube_imap_generic.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php
index f45694dd0..3b5be15db 100644
--- a/program/lib/Roundcube/rcube_imap_generic.php
+++ b/program/lib/Roundcube/rcube_imap_generic.php
@@ -3143,7 +3143,8 @@ class rcube_imap_generic
if (isset($mbox) && is_array($data[$i])) {
$size_sub = count($data[$i]);
for ($x=0; $x<$size_sub; $x++) {
- $result[$mbox][$data[$i][$x]] = $data[$i][++$x];
+ if ($data[$i][$x+1] !== null)
+ $result[$mbox][$data[$i][$x]] = $data[$i][++$x];
}
unset($data[$i]);
}
@@ -3161,7 +3162,8 @@ class rcube_imap_generic
}
}
else if (isset($mbox)) {
- $result[$mbox][$data[$i]] = $data[++$i];
+ if ($data[$i+1] !== null)
+ $result[$mbox][$data[$i]] = $data[++$i];
unset($data[$i]);
unset($data[$i-1]);
}
@@ -3306,10 +3308,10 @@ class rcube_imap_generic
for ($x=0, $len=count($attribs); $x<$len;) {
$attr = $attribs[$x++];
$value = $attribs[$x++];
- if ($attr == 'value.priv') {
+ if ($attr == 'value.priv' && $value !== null) {
$result[$mbox]['/private' . $entry] = $value;
}
- else if ($attr == 'value.shared') {
+ else if ($attr == 'value.shared' && $value !== null) {
$result[$mbox]['/shared' . $entry] = $value;
}
}