Skip to content

Commit

Permalink
cs + simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
infograf768 committed Apr 12, 2015
1 parent 7675faf commit f2bfa38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions modules/mod_languages/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public static function getList(&$params)
foreach ($languages as $i => &$language)
{
JLoader::register('MultilangstatusHelper', JPATH_ADMINISTRATOR . '/components/com_languages/helpers/multilangstatus.php');

// Do not display language without frontend UI
if (!array_key_exists($language->lang_code, MultilangstatusHelper::getSitelangs()))
{
Expand Down
4 changes: 1 addition & 3 deletions plugins/system/languagefilter/languagefilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Joomla\Registry\Registry;

JLoader::register('MenusHelper', JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php');
JLoader::register('MultilangstatusHelper', JPATH_ADMINISTRATOR . '/components/com_languages/helpers/multilangstatus.php');

/**
* Joomla! Language Filter Plugin.
Expand Down Expand Up @@ -60,7 +61,6 @@ public function __construct(&$subject, $config)
$this->lang_codes = JLanguageHelper::getLanguages('lang_code');

$levels = JFactory::getUser()->getAuthorisedViewLevels();
JLoader::register('MultilangstatusHelper', JPATH_ADMINISTRATOR . '/components/com_languages/helpers/multilangstatus.php');

foreach ($this->sefs as $sef => $language)
{
Expand Down Expand Up @@ -530,8 +530,6 @@ public function onUserLogin($user, $options = array())

// The user language has been deleted/disabled or the related content language does not exist/has been unpublished
// or the related home page does not exist/has been unpublished
JLoader::register('MultilangstatusHelper', JPATH_ADMINISTRATOR . '/components/com_languages/helpers/multilangstatus.php');

if (!array_key_exists($lang_code, MultilangstatusHelper::getSitelangs())
|| !array_key_exists($lang_code, MultilangstatusHelper::getContentlangs())
|| !array_key_exists($lang_code, MultilangstatusHelper::getHomepages()))
Expand Down

0 comments on commit f2bfa38

Please sign in to comment.