Bug 31401: (QA follow-up) Remove Koha.ArePluginsEnabled, it is no longer needed
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
aa90b60ea2
commit
c5810c3605
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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 ) %]
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue