Skip to content

Commit

Permalink
[plg_system_stats] Load plugin language files only when needed (#11728)
Browse files Browse the repository at this point in the history
* Load plugin language files only when needed (if plugin enabled and user in administrator client)

* Update stats.php

* remove autoloadLanguage property and use this
  • Loading branch information
andrepereiradasilva authored and rdeutz committed Aug 25, 2016
1 parent 99a76db commit eca1bc5
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions plugins/system/stats/stats.php
Expand Up @@ -43,14 +43,6 @@ class PlgSystemStats extends JPlugin
*/
protected $app;

/**
* Load plugin language files automatically
*
* @var boolean
* @since 3.5
*/
protected $autoloadLanguage = true;

/**
* Database object
*
Expand Down Expand Up @@ -99,6 +91,9 @@ public function onAfterInitialise()
return;
}

// Load plugin language files only when needed (ex: they are not needed in site client).
$this->loadLanguage();

JHtml::_('jquery.framework');
JHtml::script('plg_system_stats/stats.js', false, true, false);
}
Expand Down

0 comments on commit eca1bc5

Please sign in to comment.