diff options
author | Alexander Sulfrian <alex@spline.inf.fu-berlin.de> | 2016-05-25 01:15:54 +0200 |
---|---|---|
committer | otrs <otrs@vm-tickets.spline.inf.fu-berlin.de> | 2016-05-25 01:17:06 +0200 |
commit | 6b45d2ab7344e0022ac4d33494b470364d681be6 (patch) | |
tree | 816a05e60ca69b927539a7b4ecd70fc0a711fcb2 /Kernel/System/Cache | |
parent | 4d081a0103b17e7221abe8b4218fed031c1e4c50 (diff) | |
download | FakePackageVerification-master.tar.gz FakePackageVerification-master.tar.bz2 FakePackageVerification-master.zip |
The plugin wrapps the Get method of the default Cache::Module and
returns a "custom" value for all PackageVerification cache queries.
This hides the notification about failed verification, but does not
show a verified badge.
Diffstat (limited to 'Kernel/System/Cache')
-rw-r--r-- | Kernel/System/Cache/FakeVerifyFileStorable.pm | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Kernel/System/Cache/FakeVerifyFileStorable.pm b/Kernel/System/Cache/FakeVerifyFileStorable.pm new file mode 100644 index 0000000..183c1af --- /dev/null +++ b/Kernel/System/Cache/FakeVerifyFileStorable.pm @@ -0,0 +1,28 @@ +package Kernel::System::Cache::FakeVerifyFileStorable; + +use strict; +use warnings; + +our @ObjectDependencies = ( + 'Kernel::System::Cache::FileStorable', +); + +use parent 'Kernel::System::Cache::FileStorable'; + +sub Get { + my ( $Self, %Param ) = @_; + + # check needed stuff + if ( !defined $Param{Type} ) { + $Kernel::OM->Get('Kernel::System::Log')->Log( + Priority => 'error', + Message => "Need Type!" + ); + return; + } + + return 'custom' if $Param{Type} eq 'PackageVerification'; + return Kernel::System::Cache::FileStorable::Get(@_); +} + +1; |