xf_phantom
Well-known member
The Handlers need to be more flexible and allow addons to manipulate the metadata.
E.g. i've replaced the _insert methods in the handlers with
this way i can use the proxy system to extend the handler and add own metadata with several other addons, without any overhead
E.g. i've replaced the _insert methods in the handlers with
PHP:
protected function _insertIntoIndex(XenForo_Search_Indexer $indexer, array $data, array $parentData = null)
{
$threadModel = $this->_getThreadModel();
if ($threadModel->isRedirect($data) || !$threadModel->isVisible($data))
{
return;
}
$metadata = $this->getMetaDataArray($data, $parentData);
$indexer->insertIntoIndex(
'thread', $data['thread_id'],
$data['title'], '',
$data['post_date'], $data['user_id'], $data['thread_id'], $metadata
);
}
protected function getMetaDataArray(array $data, array $parentData){
...
}
this way i can use the proxy system to extend the handler and add own metadata with several other addons, without any overhead
Upvote
3