Performance: Don't resolve tag members on every mail message preview
This process might be expensive when using tags heavily and we already do this when we list messages.
This commit is contained in:
parent
e720d9c717
commit
40219b2f0d
1 changed files with 3 additions and 3 deletions
|
@ -335,7 +335,7 @@ class kolab_tags_engine
|
|||
$tags = array();
|
||||
|
||||
foreach ($taglist as $tag) {
|
||||
$tag = $this->parse_tag($tag, true);
|
||||
$tag = $this->parse_tag($tag, true, false);
|
||||
if (in_array($uid, (array)$tag['uids'][$folder])) {
|
||||
unset($tag['uids']);
|
||||
$tags[] = $tag;
|
||||
|
@ -434,7 +434,7 @@ class kolab_tags_engine
|
|||
/**
|
||||
* "Convert" tag object to simple array for use in javascript
|
||||
*/
|
||||
private function parse_tag($tag, $list = false)
|
||||
private function parse_tag($tag, $list = false, $force = true)
|
||||
{
|
||||
$result = array(
|
||||
'uid' => $tag['uid'],
|
||||
|
@ -443,7 +443,7 @@ class kolab_tags_engine
|
|||
);
|
||||
|
||||
if ($list) {
|
||||
$result['uids'] = $this->get_tag_messages($tag);
|
||||
$result['uids'] = $this->get_tag_messages($tag, $force);
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
|
Loading…
Add table
Reference in a new issue