Add fall-back to the full uri for searching relations in cache
This commit is contained in:
parent
63b69871fe
commit
6f0ef60f7a
2 changed files with 14 additions and 2 deletions
|
@ -241,6 +241,10 @@ class kolab_format_configuration extends kolab_format
|
||||||
else if (!empty($member['params']['message-id'])) {
|
else if (!empty($member['params']['message-id'])) {
|
||||||
$words[] = $member['params']['message-id'];
|
$words[] = $member['params']['message-id'];
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// derive message identifier from URI
|
||||||
|
$words[] = md5($url);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $words;
|
return $words;
|
||||||
|
|
|
@ -351,6 +351,8 @@ class kolab_storage_config
|
||||||
'params' => $params,
|
'params' => $params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -765,10 +767,16 @@ class kolab_storage_config
|
||||||
$filter = array(
|
$filter = array(
|
||||||
array('type', '=', 'relation'),
|
array('type', '=', 'relation'),
|
||||||
array('category', '=', 'generic'),
|
array('category', '=', 'generic'),
|
||||||
// @TODO: what if Message-Id (and Date) does not exist?
|
|
||||||
array('member', '=', $message->get('message-id', false)),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// query by message-id
|
||||||
|
$member_id = $message->get('message-id', false);
|
||||||
|
if (empty($member_id)) {
|
||||||
|
// derive message identifier from URI
|
||||||
|
$member_id = md5($uri);
|
||||||
|
}
|
||||||
|
array('member', '=', $member_id);
|
||||||
|
|
||||||
// get UIDs of assigned notes
|
// get UIDs of assigned notes
|
||||||
foreach ($this->get_objects($filter, $default) as $relation) {
|
foreach ($this->get_objects($filter, $default) as $relation) {
|
||||||
// we don't need to update members if the URI is found
|
// we don't need to update members if the URI is found
|
||||||
|
|
Loading…
Add table
Reference in a new issue