From 2c36e7f3c78854e752c77042c1c1f67a9a74be18 Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Wed, 22 Jun 2022 11:12:42 +0200 Subject: [PATCH] Update for redmine 5.0.x compatibility --- init.rb | 7 ++++--- lib/wiki_notes_application_hooks.rb | 1 + lib/wiki_notes_macros.rb | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/init.rb b/init.rb index 6c838a7..d628438 100644 --- a/init.rb +++ b/init.rb @@ -16,6 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. require 'redmine' + begin require 'config/initializers/session_store.rb' rescue LoadError @@ -42,10 +43,10 @@ require 'RedCloth' Redmine::Plugin.register :redmine_wiki_notes do name 'Redmine Wiki Notes plugin' - author 'Daniel Seifert, Victor Laborie' + author 'Daniel Seifert, Victor Laborie, Ludovic Poujol' description 'Allows adding different kinds of notes into a wiki page' - url "http://www.github.com/vlaborie/redmine_wiki_notes" if respond_to?(:url) - version '0.0.5' + url "https://gitea.evolix.org/evolix/redmine_wiki_notes" if respond_to?(:url) + version '0.0.6' requires_redmine :version_or_higher => '4.0.0' RedCloth3::ALLOWED_TAGS << "div" diff --git a/lib/wiki_notes_application_hooks.rb b/lib/wiki_notes_application_hooks.rb index 984da86..39541a4 100644 --- a/lib/wiki_notes_application_hooks.rb +++ b/lib/wiki_notes_application_hooks.rb @@ -1,4 +1,5 @@ require 'redmine' + class WikiNotesApplicationHooks < Redmine::Hook::ViewListener def view_layouts_base_html_head(context = {}) # beware of http://www.redmine.org/issues/3935 diff --git a/lib/wiki_notes_macros.rb b/lib/wiki_notes_macros.rb index a4c150c..21d9466 100644 --- a/lib/wiki_notes_macros.rb +++ b/lib/wiki_notes_macros.rb @@ -1,4 +1,4 @@ -module WikiNotesMacro +module WikiNotesMacros Redmine::WikiFormatting::Macros.register do desc "Adds a note to the wiki page:\n\n" + "
\n" +