Bugzilla – Attachment 50162 Details for
Bug 16237
Adding new EDI account results in Perl error when plugins are not activated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16237: Allow entering of EDI accounts with plugins disabled
Bug-16237-Allow-entering-of-EDI-accounts-with-plug.patch (text/plain), 2.38 KB, created by
Jesse Weaver
on 2016-04-12 22:58:36 UTC
(
hide
)
Description:
Bug 16237: Allow entering of EDI accounts with plugins disabled
Filename:
MIME Type:
Creator:
Jesse Weaver
Created:
2016-04-12 22:58:36 UTC
Size:
2.38 KB
patch
obsolete
>From fafa165931e9af6816e8a1d5c82ed7472f61c60e Mon Sep 17 00:00:00 2001 >From: Jesse Weaver <jweaver@bywatersolutions.com> >Date: Tue, 12 Apr 2016 16:52:29 -0600 >Subject: [PATCH] Bug 16237: Allow entering of EDI accounts with plugins > disabled > >Test plan: > 1. Disable <enable_plugins> in koha-conf.xml (restart memcached if needed). > 2. Open the EDI accounts admin page. > 3. Notice incredible breakage. > 4. Apply patch. > 5. Reload page, should now display (and the "Plugin:" dropdown should > be hidden). > 6. Re-enable <enable_plugins> (and the UseKohaPlugins syspref as > well). > 7. Ensure that the "Plugin:" dropdown is once again displayed. >--- > admin/edi_accounts.pl | 9 +++++++-- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_accounts.tt | 4 ++++ > 2 files changed, 11 insertions(+), 2 deletions(-) > >diff --git a/admin/edi_accounts.pl b/admin/edi_accounts.pl >index 69c270b..5f963bd 100755 >--- a/admin/edi_accounts.pl >+++ b/admin/edi_accounts.pl >@@ -53,8 +53,13 @@ if ( $op eq 'acct_form' ) { > ); > $template->param( vendors => \@vendors ); > >- my @plugins = Koha::Plugins->new()->GetPlugins('edifact'); >- $template->param( plugins => \@plugins ); >+ my $plugins_enabled = C4::Context->preference('UseKohaPlugins') && C4::Context->config("enable_plugins"); >+ $template->param( plugins_enabled => $plugins_enabled ); >+ >+ if ( $plugins_enabled ) { >+ my @plugins = Koha::Plugins->new()->GetPlugins('edifact'); >+ $template->param( plugins => \@plugins ); >+ } > } > elsif ( $op eq 'delete_confirm' ) { > show_account(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_accounts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_accounts.tt >index 93c2ce4..03c171d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_accounts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_accounts.tt >@@ -76,6 +76,7 @@ > [% END %] > </select> > </li> >+ [% IF plugins_enabled %] > <li> > <label for="plugin">Plugin: </label> > <select name="plugin" id="plugin"> >@@ -89,6 +90,9 @@ > [% END %] > </select> > </li> >+ [% ELSE %] >+ <input type="hidden" name="plugin" value="" /> >+ [% END %] > <li> > <label for="description">Description: </label> > <input type="text" name="description" id="description" size="20" maxlength="90" value="[% account.description %]" /> >-- >2.8.0.rc3
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 16237
:
50162
|
50218