Overwriting canonicalizeRequestUrl in child?

Jaxel

Well-known member
XenForo_ControllerPublic_Thread->Index has the following code:
Code:
$this->canonicalizeRequestUrl(
    XenForo_Link::buildPublicLink('threads', $thread, array('page' => $page))
);
I would like to replace it with this under specific circumstances:
Code:
$this->canonicalizeRequestUrl(
    XenForo_Link::buildPublicLink('articles', $thread, array('page' => $page))
);

I have extended this using a function: Custom_ControllerPublic_Thread->Index:
Code:
$response = parent::actionIndex();

if ($this->getModelFromCache('Custom_Model_Thread')->getById($response->params['thread']))
{
    // something here!
}

return $response;

How would I override the canonicalizeRequestUrl function without causing an infinite loop?
 
Top Bottom