Skip to content

Commit

Permalink
[JLanguage] Do not run the load language file method twice in the def…
Browse files Browse the repository at this point in the history
…ault language (#11997)

* Do not run the load language file method twice in the default language

* readd parenthisis
  • Loading branch information
andrepereiradasilva authored and rdeutz committed Sep 10, 2016
1 parent 7a34030 commit 68074eb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions libraries/joomla/language/language.php
Original file line number Diff line number Diff line change
Expand Up @@ -723,18 +723,19 @@ public static function exists($lang, $basePath = JPATH_BASE)
*/
public function load($extension = 'joomla', $basePath = JPATH_BASE, $lang = null, $reload = false, $default = true)
{
// If language is null set as the current language.
if (!$lang)
{
$lang = $this->lang;
}

// Load the default language first if we're not debugging and a non-default language is requested to be loaded
// with $default set to true
if (!$this->debug && ($lang != $this->default) && $default)
{
$this->load($extension, $basePath, $this->default, false, true);
}

if (!$lang)
{
$lang = $this->lang;
}

$path = self::getLanguagePath($basePath, $lang);

$internal = $extension == 'joomla' || $extension == '';
Expand Down

0 comments on commit 68074eb

Please sign in to comment.