From be91938409b3dc85803161a65f68d21b36fa6698 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 | 12 +++++++++--- .../prog/en/modules/tools/tools-home.tt | 9 ++++++++- 2 files changed, 17 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 fd55daf828..5b574c98df 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 @@ -136,6 +136,12 @@ [% 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 %] @@ -187,19 +193,19 @@