diff --git a/components/com_contact/helpers/association.php b/components/com_contact/helpers/association.php index fecb1810ab0a7..2f2be6c3956ae 100644 --- a/components/com_contact/helpers/association.php +++ b/components/com_contact/helpers/association.php @@ -10,6 +10,7 @@ defined('_JEXEC') or die; JLoader::register('ContactHelper', JPATH_ADMINISTRATOR . '/components/com_contact/helpers/contact.php'); +JLoader::register('ContactHelperRoute', JPATH_SITE . '/components/com_contact/helpers/route.php'); JLoader::register('CategoryHelperAssociation', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/association.php'); /** @@ -29,15 +30,11 @@ abstract class ContactHelperAssociation extends CategoryHelperAssociation * * @since 3.0 */ - public static function getAssociations($id = 0, $view = null) { - jimport('helper.route', JPATH_COMPONENT_SITE); - - $app = JFactory::getApplication(); - $jinput = $app->input; - $view = is_null($view) ? $jinput->get('view') : $view; - $id = empty($id) ? $jinput->getInt('id') : $id; + $jinput = JFactory::getApplication()->input; + $view = is_null($view) ? $jinput->get('view') : $view; + $id = empty($id) ? $jinput->getInt('id') : $id; if ($view == 'contact') { diff --git a/components/com_content/helpers/association.php b/components/com_content/helpers/association.php index 806e5db6090e3..278cdbeb5e8b5 100644 --- a/components/com_content/helpers/association.php +++ b/components/com_content/helpers/association.php @@ -10,6 +10,7 @@ defined('_JEXEC') or die; JLoader::register('ContentHelper', JPATH_ADMINISTRATOR . '/components/com_content/helpers/content.php'); +JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php'); JLoader::register('CategoryHelperAssociation', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/association.php'); /** @@ -29,15 +30,11 @@ abstract class ContentHelperAssociation extends CategoryHelperAssociation * * @since 3.0 */ - public static function getAssociations($id = 0, $view = null) { - jimport('helper.route', JPATH_COMPONENT_SITE); - - $app = JFactory::getApplication(); - $jinput = $app->input; - $view = is_null($view) ? $jinput->get('view') : $view; - $id = empty($id) ? $jinput->getInt('id') : $id; + $jinput = JFactory::getApplication()->input; + $view = is_null($view) ? $jinput->get('view') : $view; + $id = empty($id) ? $jinput->getInt('id') : $id; if ($view == 'article') { diff --git a/components/com_newsfeeds/helpers/association.php b/components/com_newsfeeds/helpers/association.php index 7517875963cd7..48f0ea4f8c467 100644 --- a/components/com_newsfeeds/helpers/association.php +++ b/components/com_newsfeeds/helpers/association.php @@ -10,6 +10,7 @@ defined('_JEXEC') or die; JLoader::register('NewsfeedsHelper', JPATH_ADMINISTRATOR . '/components/com_newsfeeds/helpers/newsfeeds.php'); +JLoader::register('NewsfeedsHelperRoute', JPATH_SITE . '/components/com_newsfeeds/helpers/route.php'); JLoader::register('CategoryHelperAssociation', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/association.php'); /** @@ -29,15 +30,11 @@ abstract class NewsfeedsHelperAssociation extends CategoryHelperAssociation * * @since 3.0 */ - public static function getAssociations($id = 0, $view = null) { - jimport('helper.route', JPATH_COMPONENT_SITE); - - $app = JFactory::getApplication(); - $jinput = $app->input; - $view = is_null($view) ? $jinput->get('view') : $view; - $id = empty($id) ? $jinput->getInt('id') : $id; + $jinput = JFactory::getApplication()->input; + $view = is_null($view) ? $jinput->get('view') : $view; + $id = empty($id) ? $jinput->getInt('id') : $id; if ($view == 'newsfeed') {