function recommend($link_id, $option) { global $savantConf; $document =& JFactory::getDocument(); $link = loadLink($link_id, $savantConf, $fields, $params); $document->setTitle(JText::_('Recommend') . " " . $link->link_name); recommend_cache($link, $fields, $params, $option); }
function recommend( $link_id, $option ) { global $savantConf; $link = loadLink( $link_id, $savantConf, $fields, $params ); if($link === false) { JError::raiseError(404, JText::_('Resource Not Found')); } else { $title = JText::_( 'Recommend' ) ." ". $link->link_name; setTitle($title); recommend_cache( $link, $fields, $params, $option ); } }