{ KunenaRoute::cacheLoad(); $contents = $controller->execute(); KunenaRoute::cacheStore(); } elseif (is_file(KPATH_SITE . "/controllers/{$view}.php")) { // Execute old MVC. // Legacy support: If the content layout doesn't exist on HMVC, load and execute the old controller. $controller = KunenaController::getInstance(); KunenaRoute::cacheLoad(); ob_start(); $controller->execute($task); $contents = ob_get_clean(); KunenaRoute::cacheStore(); $controller->redirect(); } else { // Legacy URL support. $uri = KunenaRoute::current(true); if ($uri) { // FIXME: using wrong Itemid JFactory::getApplication()->redirect(KunenaRoute::_($uri, false)); } else { return JError::raiseError(404, "Kunena view '{$view}' not found"); }