Skip to content

Commit

Permalink
Removed the isEnabled() check and replaced getPlugin() by loadPlugin()
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Apr 2, 2024
1 parent ee0e8a1 commit 89f1ed5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions MostViewedHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ public function getName(): string
public function executeActions(): bool
{
/** @var MostViewedPlugin $plugin */
$plugin = PluginRegistry::getPlugin('generic', 'mostviewedplugin');
if (!$plugin->getEnabled()) {
return false;
}
$plugin = PluginRegistry::loadPlugin('generic', 'mostviewedplugin');
$contextDao = Application::getContextDAO();
foreach ($contextDao->getAll()->toIterator() as $context) {
if (!$plugin->getEnabled($context->getId())) {
Expand Down

0 comments on commit 89f1ed5

Please sign in to comment.