[Rt-commit] rtir branch, 5.0/fix-disablecountermeasures-config, created. 5.0.0-17-geab150c1
Craig Kaiser
craig at bestpractical.com
Tue Nov 10 17:38:06 EST 2020
The branch, 5.0/fix-disablecountermeasures-config has been created
at eab150c17918e5b8c66815da18eb04e5bdd188d0 (commit)
- Log -----------------------------------------------------------------
commit eab150c17918e5b8c66815da18eb04e5bdd188d0
Author: craig kaiser <craig at bestpractical.com>
Date: Tue Nov 10 17:37:48 2020 -0500
If config is set remove countermeasures portlet
diff --git a/lib/RT/IR/Config.pm b/lib/RT/IR/Config.pm
index 5047499a..a283bc1c 100644
--- a/lib/RT/IR/Config.pm
+++ b/lib/RT/IR/Config.pm
@@ -113,6 +113,33 @@ sub Init {
}
};
+ my %LinkedQueuePortlets = %{RT->Config->Get('LinkedQueuePortlets')};
+ my $RTIR_DisableCountermeasures = RT->Config->Get('RTIR_DisableCountermeasures');
+
+ if ( $RTIR_DisableCountermeasures && %LinkedQueuePortlets ) {
+ my %linked_queue_portlets;
+
+ foreach my $top_level_queue ( keys %LinkedQueuePortlets ) {
+ foreach my $queue_config ( $LinkedQueuePortlets{$top_level_queue} ) {
+ my $i = 0;
+ my @linked_queues;
+ foreach my $linked_queue ( @{$queue_config} ) {
+ my $key = (keys %{$linked_queue})[0];
+ my $out = (@{$LinkedQueuePortlets{$top_level_queue}})[$i];
+
+ if ( $key eq 'Countermeasures' ) {
+ last;
+ }
+ else {
+ push @linked_queues, $out;
+ }
+ $i++;
+ }
+ $LinkedQueuePortlets{$top_level_queue} = \@linked_queues;
+ }
+ }
+ }
+
my @homepage_components = @{RT->Config->Get('HomepageComponents')};
foreach my $component (RT->Config->Get('RTIR_HomepageComponents')){
-----------------------------------------------------------------------
More information about the rt-commit
mailing list