only support mod_stats and mod_stats_admin (#338)

* only support mod_stats and mod_stats_admin

* logic error
This commit is contained in:
zero-24 2017-04-21 19:24:27 +02:00 committed by Yves Hoppe
parent dd7c338448
commit c6eac62828
1 changed files with 16 additions and 0 deletions

View File

@ -24,6 +24,17 @@ class PlgSystemWeblinks extends JPlugin
*/
protected $autoloadLanguage = true;
/**
* Supported Extensions
*
* @var array
* @since __DEPLOY_VERSION__
*/
private $supportedExtensions = array(
'mod_stats',
'mod_stats_admin',
);
/**
* Method to add statistics information to Administrator control panel.
*
@ -35,6 +46,11 @@ class PlgSystemWeblinks extends JPlugin
*/
public function onGetStats($extension)
{
if (!in_array($extension, $this->supportedExtensions))
{
return array();
}
if (!JComponentHelper::isEnabled('com_weblinks'))
{
return array();