• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Overwriting canonicalizeRequestUrl in child?

Jaxel

Well-known member
#1
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?