diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2019-10-03 02:26:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-03 02:26:35 +0300 |
commit | e5d410561b2e2e0b0601762484a42c425ec4c522 (patch) | |
tree | 161500bbafd0ca2992fc80f324f9f3ea6bf25e4b /plugins/Tour | |
parent | a4b19cfc5adc166fc025db2093972947f9459fc3 (diff) |
Check if widget is enabled in admin home before checking it, fix system summary (#14930)
Diffstat (limited to 'plugins/Tour')
-rw-r--r-- | plugins/Tour/Engagement/Challenges.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Tour/Engagement/Challenges.php b/plugins/Tour/Engagement/Challenges.php index ffc570930b..40b9cffece 100644 --- a/plugins/Tour/Engagement/Challenges.php +++ b/plugins/Tour/Engagement/Challenges.php @@ -12,8 +12,10 @@ use Piwik\Container\StaticContainer; use Piwik\Piwik; use Piwik\Plugin; use Piwik\Plugins\CoreAdminHome\Controller; +use Piwik\Plugins\SitesManager\SitesManager; use Piwik\Plugins\Tour\Dao\DataFinder; use Piwik\Plugins\UserCountry\UserCountry; +use Piwik\Plugins\UsersManager\UsersManager; class Challenges { @@ -45,10 +47,10 @@ class Challenges $challenges[] = StaticContainer::get(ChallengeCustomLogo::class); - if ($this->isActivePlugin('UsersManager')) { + if ($this->isActivePlugin('UsersManager') && UsersManager::isUsersAdminEnabled()) { $challenges[] = StaticContainer::get(ChallengeAddedUser::class); } - if ($this->isActivePlugin('SitesManager')) { + if ($this->isActivePlugin('SitesManager') && SitesManager::isSitesAdminEnabled()) { $challenges[] = StaticContainer::get(ChallengeAddedWebsite::class); } |