function fetchCategory($id) { global $_DMUSER; $cat = new DOCMAN_Category($id); // if the user is not authorized to access this category, redirect if (!$_DMUSER->canAccessCategory($cat->getDBObject())) { _returnTo('', _DML_NOT_AUTHORIZED); } // process content mambots DOCMAN_Utils::processContentBots($cat, 'description'); return HTML_DMCategories::displayCategory($cat->getLinkObject(), $cat->getPathObject(), $cat->getDataObject()); }
function fetchCategory($id) { global $_DMUSER; $cat = new DOCMAN_Category($id); // if the user is not authorized to access this category, redirect if (!$_DMUSER->canAccessCategory($cat->getDBObject())) { return JError::raiseError(404, JText::_("Resource Not Found")); } // process content mambots DOCMAN_Utils::processContentBots($cat, 'description'); return HTML_DMCategories::displayCategory($cat->getLinkObject(), $cat->getPathObject(), $cat->getDataObject()); }