<?php

class RouteChanger_Route_Prefix_Category extends XFCP_RouteChanger_Route_Prefix_Category
{
	public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
	{
		$link = parent::buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, $extraParams);

		if (!$link instanceof XenForo_Link)
		{
			return $link;
		}

		return XenForo_Link::buildBasicLink(RouteChanger_Route_Static::$newIndex, $action, $extension) . strval($link);
	}
}