From f2113cbc9c3c179bf981c6a5e3504d0a19deaed1 Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 4 Jan 2023 01:21:34 +0000 Subject: [PATCH] Bug 31380: Add plugin hook for choosing Mojolicious or CGI script controller This change checks for a "use_mojolicious" method in the plugin in order to determine whether it should use a Mojolicious controller or a CGI script controller. Note that the check is for the existence of the method, so it is backwards compatible with all existing Koha Plugins. --- .../prog/en/modules/plugins/plugins-home.tt | 10 +++++++--- .../intranet-tmpl/prog/en/modules/tools/tools-home.tt | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt index ce9d9c5ce2..5e5a23b517 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt @@ -147,6 +147,10 @@ [% FOREACH plugin IN plugins %] + [% plugin_link = '/cgi-bin/koha/plugins/run.pl' %] + [% IF ( plugin.can('use_mojolicious') ) %] + [% plugin_link = '/cgi-bin/koha/staff/plugins/run' %] + [% END %] [% IF plugin.error %] @@ -200,19 +204,19 @@