use JLoader (#247)

This commit is contained in:
andrepereiradasilva 2016-07-28 21:17:26 +01:00 committed by Chris Davenport
parent 00ddf5b2e6
commit afa26265d8
1 changed files with 3 additions and 4 deletions

View File

@ -10,6 +10,7 @@
defined('_JEXEC') or die;
JLoader::register('WeblinksHelper', JPATH_ADMINISTRATOR . '/components/com_weblinks/helpers/weblinks.php');
JLoader::register('WeblinksHelperRoute', JPATH_SITE . '/components/com_weblinks/helpers/route.php');
JLoader::register('CategoryHelperAssociation', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/association.php');
/**
@ -31,11 +32,9 @@ abstract class WeblinksHelperAssociation extends CategoryHelperAssociation
*/
public static function getAssociations($id = 0, $view = null)
{
jimport('helper.route', JPATH_COMPONENT_SITE);
$jinput = JFactory::getApplication()->input;
$view = is_null($view) ? $jinput->get('view') : $view;
$id = empty($id) ? $jinput->getInt('id') : $id;
$view = is_null($view) ? $jinput->get('view') : $view;
$id = empty($id) ? $jinput->getInt('id') : $id;
if ($view == 'category' || $view == 'categories')
{