30
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-06-09 09:42:24 +00:00

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

View File

@ -24,6 +24,17 @@ class PlgSystemWeblinks extends JPlugin
*/ */
protected $autoloadLanguage = true; 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. * Method to add statistics information to Administrator control panel.
* *
@ -35,6 +46,11 @@ class PlgSystemWeblinks extends JPlugin
*/ */
public function onGetStats($extension) public function onGetStats($extension)
{ {
if (!in_array($extension, $this->supportedExtensions))
{
return array();
}
if (!JComponentHelper::isEnabled('com_weblinks')) if (!JComponentHelper::isEnabled('com_weblinks'))
{ {
return array(); return array();