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

Commit

Permalink
Disable other plugins on voter because they may make conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
fluxfw committed Jan 18, 2023
1 parent 04fcaab commit 453dd90
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 453dd90

Please sign in to comment.