Internal error while opening Settings page #1424

This commit is contained in:
Karel Pičman 2023-01-27 10:52:35 +01:00
parent 0bc77ca3a7
commit 3174ddfef1
3 changed files with 3 additions and 4 deletions

View File

@ -55,6 +55,6 @@ end
if Redmine::Plugin.installed?(:easy_extensions) if Redmine::Plugin.installed?(:easy_extensions)
RedmineExtensions::PatchManager.register_patch_to_be_first 'Redmine::Notifiable', RedmineExtensions::PatchManager.register_patch_to_be_first 'Redmine::Notifiable',
'RedmineDmsf::Patches::NotifiablePatch', prepend: true, first: true 'RedmineDmsf::Patches::NotifiablePatch', prepend: true, first: true
elsif(!RedmineDmsf::Plugin.an_osolete_plugin_present?) elsif !RedmineDmsf::Plugin.an_osolete_plugin_present?
Redmine::Notifiable.prepend RedmineDmsf::Patches::NotifiablePatch Redmine::Notifiable.prepend RedmineDmsf::Patches::NotifiablePatch
end end

View File

@ -54,7 +54,6 @@ module RedmineDmsf
end end
# Apply the patch # Apply the patch
if (RedmineDmsf::Plugin.present?(:redmine_questions) || Redmine::Plugin.installed?(:redmine_contacts) || if RedmineDmsf::Plugin.an_osolete_plugin_present? && !Redmine::Plugin.installed?(:easy_extensions)
Redmine::Plugin.installed?(:redmine_checklists)) && !Redmine::Plugin.installed?(:easy_extensions)
Redmine::Notifiable.send :include, RedmineDmsf::Patches::NotifiableRuPatch Redmine::Notifiable.send :include, RedmineDmsf::Patches::NotifiableRuPatch
end end

View File

@ -33,7 +33,7 @@ module RedmineDmsf
# present. # present.
# It is related especially to plugins made by AplhaNode and RedmineUP. # It is related especially to plugins made by AplhaNode and RedmineUP.
def self.an_osolete_plugin_present? def self.an_osolete_plugin_present?
plugins = %w(questions contacts checklists db passwords) plugins = %w(questions contacts checklists db passwords resources)
plugins.each do|plugin| plugins.each do|plugin|
if Plugin.present?("redmine_#{plugin}") if Plugin.present?("redmine_#{plugin}")
return true return true