Bugzilla – Attachment 140152 Details for
Bug 31401
Update administration sidebar to match entries on administration start page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31401: (QA follow-up) Remove Koha.ArePluginsEnabled, it is no longer needed
Bug-31401-QA-follow-up-Remove-KohaArePluginsEnable.patch (text/plain), 6.29 KB, created by
Kyle M Hall (khall)
on 2022-09-02 14:28:47 UTC
(
hide
)
Description:
Bug 31401: (QA follow-up) Remove Koha.ArePluginsEnabled, it is no longer needed
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-09-02 14:28:47 UTC
Size:
6.29 KB
patch
obsolete
>From efd8ada3d302fd43393f68c52c1f3b08003bb952 Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Fri, 2 Sep 2022 10:27:39 -0400 >Subject: [PATCH] Bug 31401: (QA follow-up) Remove Koha.ArePluginsEnabled, it > is no longer needed > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Template/Plugin/Koha.pm | 10 ---------- > .../prog/en/includes/reports-menu.inc | 2 +- > .../intranet-tmpl/prog/en/includes/tools-menu.inc | 4 ++-- > .../prog/en/modules/reports/reports-home.tt | 2 +- > .../prog/en/modules/tools/tools-home.tt | 4 ++-- > t/Koha_Template_Plugin_Koha.t | 14 +------------- > 6 files changed, 7 insertions(+), 29 deletions(-) > >diff --git a/Koha/Template/Plugin/Koha.pm b/Koha/Template/Plugin/Koha.pm >index 9ecd7fde0d..5e7a303f70 100644 >--- a/Koha/Template/Plugin/Koha.pm >+++ b/Koha/Template/Plugin/Koha.pm >@@ -84,14 +84,4 @@ sub Version { > }; > } > >-=head3 ArePluginsEnabled >- >-Returns true if plugins are enabled, false otherwise. >- >-=cut >- >-sub ArePluginsEnabled { >- return C4::Context->config('enable_plugins'); >-} >- > 1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-menu.inc >index d63b3e923d..3727737311 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-menu.inc >@@ -28,7 +28,7 @@ > <li><a href="/cgi-bin/koha/reports/reserves_stats.pl">Holds</a></li> > </ul> > >- [% IF Koha.ArePluginsEnabled() %] >+ [% IF plugins_enabled %] > <h5>Report plugins</h5> > <ul> > <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=report">Report plugins</a></li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc >index 0cc705c6f4..d994c22ecb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc >@@ -95,7 +95,7 @@ > [% END %] > </ul> > [% END %] >-[% IF ( CAN_user_tools_edit_calendar || CAN_user_tools_manage_csv_profiles || CAN_user_tools_view_system_logs || CAN_user_tools_edit_additional_contents || CAN_user_tools_schedule_tasks || CAN_user_tools_edit_quotes || ( Koha.ArePluginsEnabled() && CAN_user_plugins_tool ) || CAN_user_tools_upload_general_files || CAN_user_tools_access_files ) %] >+[% IF ( CAN_user_tools_edit_calendar || CAN_user_tools_manage_csv_profiles || CAN_user_tools_view_system_logs || CAN_user_tools_edit_additional_contents || CAN_user_tools_schedule_tasks || CAN_user_tools_edit_quotes || ( plugins_enabled && CAN_user_plugins_tool ) || CAN_user_tools_upload_general_files || CAN_user_tools_access_files ) %] > <h5>Additional tools</h5> > <ul> > [% IF ( CAN_user_tools_edit_calendar ) %] >@@ -118,7 +118,7 @@ > [% IF ( CAN_user_tools_edit_quotes ) %] > <li><a href="/cgi-bin/koha/tools/quotes.pl">Quote editor</a></li> > [% END %] >- [% IF ( Koha.ArePluginsEnabled() && CAN_user_plugins_tool ) %] >+ [% IF ( plugins_enabled && CAN_user_plugins_tool ) %] > <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=tool">Tool plugins</a></li> > [% END %] > [% IF ( CAN_user_tools_upload_general_files ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt >index 5c2de9cbf3..7dd20f34dd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt >@@ -66,7 +66,7 @@ > <li><a href="/cgi-bin/koha/reports/reserves_stats.pl">Holds</a></li> > </ul> > >- [% IF Koha.ArePluginsEnabled() %] >+ [% IF plugins_enabled %] > <h2>Report plugins</h2> > <ul> > <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=report">Report plugins</a></li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt >index 2ebca53c9e..612cf23b25 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt >@@ -96,7 +96,7 @@ > > > <div class="col-sm-4 col-sm-push-4"> >-[% IF ( CAN_user_tools_edit_calendar || CAN_user_tools_manage_csv_profiles || CAN_user_tools_view_system_logs || CAN_user_tools_edit_additional_contents || CAN_user_tools_schedule_tasks || CAN_user_tools_edit_quotes || ( Koha.ArePluginsEnabled() && CAN_user_plugins_tool ) || CAN_user_tools_upload_general_files || CAN_user_tools_access_files ) %] >+[% IF ( CAN_user_tools_edit_calendar || CAN_user_tools_manage_csv_profiles || CAN_user_tools_view_system_logs || CAN_user_tools_edit_additional_contents || CAN_user_tools_schedule_tasks || CAN_user_tools_edit_quotes || ( plugins_enabled && CAN_user_plugins_tool ) || CAN_user_tools_upload_general_files || CAN_user_tools_access_files ) %] > <h3>Additional tools</h3> > [% END %] > <dl> >@@ -136,7 +136,7 @@ > <dd>Manage 'Quote of the day' quotes</dd> > [% END %] > >- [% IF ( Koha.ArePluginsEnabled() && CAN_user_plugins_tool && tool_plugins ) %] >+ [% IF ( plugins_enabled && CAN_user_plugins_tool && tool_plugins ) %] > <dt><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=tool">Tool plugins</a></dt> > <dd> > Use tool plugins >diff --git a/t/Koha_Template_Plugin_Koha.t b/t/Koha_Template_Plugin_Koha.t >index 812f5f96cc..a8d66feb9d 100755 >--- a/t/Koha_Template_Plugin_Koha.t >+++ b/t/Koha_Template_Plugin_Koha.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 5; >+use Test::More tests => 4; > use Test::MockModule; > use t::lib::Mocks; > >@@ -77,18 +77,6 @@ subtest "Koha::Template::Plugin::Koha::Version tests" => sub { > > }; > >-subtest "Koha::Template::Plugin::Koha::ArePluginsEnabled tests" => sub { >- >- plan tests => 2; >- >- t::lib::Mocks::mock_config( 'enable_plugins', 1 ); >- is(Koha::Template::Plugin::Koha::ArePluginsEnabled(), 1, "Correct ArePluginsEnabled is yes"); >- >- t::lib::Mocks::mock_config( 'enable_plugins', 0 ); >- is(Koha::Template::Plugin::Koha::ArePluginsEnabled(), 0, "Correct ArePluginsEnabled is no"); >- >-}; >- > subtest "Koha::Template::Plugin::Koha::CSVDelimiter tests" => sub { > > plan tests => 8; >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31401
:
139436
|
139445
|
140151
| 140152