Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #36 from fluxfw/disable_other_plugins_on_voter_bec…
Browse files Browse the repository at this point in the history
…ause_they_may_make_conflict

Disable other plugins on voter because they may make conflict
  • Loading branch information
mstuder authored Jan 18, 2023
2 parents 04fcaab + 453dd90 commit 5c0a55d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use ilAccess;
use ilAppEventHandler;
use ilBenchmark;
use ilCachedComponentData;
use ilCtrl;
use ilDBWrapperFactory;
use ilErrorHandling;
Expand Down Expand Up @@ -587,6 +588,11 @@ private function initControllFlow()

private function initPluginAdmin()
{
Closure::bind(function() : void {
$this->il_plugin_by_id = [ilLiveVotingPlugin::PLUGIN_ID => $this->il_plugin_by_id[ilLiveVotingPlugin::PLUGIN_ID]];
$this->il_plugin_by_name = [ilLiveVotingPlugin::PLUGIN_NAME => $this->il_plugin_by_name[ilLiveVotingPlugin::PLUGIN_NAME]];
$this->il_plugin_active = ["robj" => array_filter($this->il_plugin_active["robj"], function(array $plugin) : bool {return $plugin["plugin_id"] === ilLiveVotingPlugin::PLUGIN_ID;})];
}, ilCachedComponentData::getInstance(), ilCachedComponentData::class)();
$this->makeGlobal("ilPluginAdmin", new ilPluginAdmin());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use ilAccess;
use ilAppEventHandler;
use ilBenchmark;
use ilCachedComponentData;
use ilCtrl;
use ilDBWrapperFactory;
use ilErrorHandling;
Expand Down Expand Up @@ -574,6 +575,12 @@ private function initControllFlow()

private function initPluginAdmin()
{
Closure::bind(function() : void {
$this->il_plugin_by_id = [ilLiveVotingPlugin::PLUGIN_ID => $this->il_plugin_by_id[ilLiveVotingPlugin::PLUGIN_ID]];
$this->il_plugin_by_name = [ilLiveVotingPlugin::PLUGIN_NAME => $this->il_plugin_by_name[ilLiveVotingPlugin::PLUGIN_NAME]];
$this->il_plugin_by_slotid = ["robj" => array_filter($this->il_plugin_by_slotid["robj"], fn(array $plugin) : bool => $plugin["plugin_id"] === ilLiveVotingPlugin::PLUGIN_ID)];
$this->il_plugin_active = ["robj" => array_filter($this->il_plugin_active["robj"], fn(array $plugin) : bool => $plugin["plugin_id"] === ilLiveVotingPlugin::PLUGIN_ID)];
}, ilCachedComponentData::getInstance(), ilCachedComponentData::class)();
$this->makeGlobal("ilPluginAdmin", new ilPluginAdmin());
}

Expand Down

0 comments on commit 5c0a55d

Please sign in to comment.