From fc5488b7da639dacb14ca159bbe59eb41049e0d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Wed, 15 Jun 2022 16:09:26 +0200 Subject: [PATCH] Error while loading list DMSF #1352 --- lib/redmine_dmsf/patches/notifiable_patch.rb | 3 ++- lib/redmine_dmsf/patches/notifiable_ru_patch.rb | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/redmine_dmsf/patches/notifiable_patch.rb b/lib/redmine_dmsf/patches/notifiable_patch.rb index 9a0bcced..e0a9d483 100644 --- a/lib/redmine_dmsf/patches/notifiable_patch.rb +++ b/lib/redmine_dmsf/patches/notifiable_patch.rb @@ -55,6 +55,7 @@ end if Redmine::Plugin.installed?(:easy_extensions) RedmineExtensions::PatchManager.register_patch_to_be_first 'Redmine::Notifiable', 'RedmineDmsf::Patches::NotifiablePatch', prepend: true, first: true -else +elsif(!(RedmineDmsf::Plugin.present?(:redmine_questions) || Redmine::Plugin.installed?(:redmine_contacts) || + Redmine::Plugin.installed?(:redmine_checklist))) Redmine::Notifiable.prepend RedmineDmsf::Patches::NotifiablePatch end \ No newline at end of file diff --git a/lib/redmine_dmsf/patches/notifiable_ru_patch.rb b/lib/redmine_dmsf/patches/notifiable_ru_patch.rb index 1d4fc89a..f4a575d2 100644 --- a/lib/redmine_dmsf/patches/notifiable_ru_patch.rb +++ b/lib/redmine_dmsf/patches/notifiable_ru_patch.rb @@ -54,4 +54,7 @@ module RedmineDmsf end # Apply the patch -Redmine::Notifiable.send :include, RedmineDmsf::Patches::NotifiableRuPatch \ No newline at end of file +if (RedmineDmsf::Plugin.present?(:redmine_questions) || Redmine::Plugin.installed?(:redmine_contacts) || + Redmine::Plugin.installed?(:redmine_checklist)) && !Redmine::Plugin.installed?(:easy_extensions) + Redmine::Notifiable.send :include, RedmineDmsf::Patches::NotifiableRuPatch +end \ No newline at end of file