Bugzilla – Attachment 50355 Details for
Bug 16208
Can't delete a library EAN if the EAN value is empty
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16208 - Can't delete a library EAN if the EAN value is empty
Bug-16208---Cant-delete-a-library-EAN-if-the-EAN-v.patch (text/plain), 3.41 KB, created by
Kyle M Hall (khall)
on 2016-04-18 16:11:37 UTC
(
hide
)
Description:
Bug 16208 - Can't delete a library EAN if the EAN value is empty
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-04-18 16:11:37 UTC
Size:
3.41 KB
patch
obsolete
>From 9b82a98e6d4f99b1da67ab10ee64eb10a9db3f60 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 18 Apr 2016 16:10:34 +0000 >Subject: [PATCH] Bug 16208 - Can't delete a library EAN if the EAN value is > empty > >Test Plan: >1) Create an empty EAN >2) Attempt to delete it, you should get an error >3) Apply this patch >4) Attempt to delete the EAN, you should now be able to >--- > admin/edi_ean_accounts.pl | 25 ++++++---------------- > .../prog/en/modules/admin/edi_ean_accounts.tt | 5 ++--- > 2 files changed, 8 insertions(+), 22 deletions(-) > >diff --git a/admin/edi_ean_accounts.pl b/admin/edi_ean_accounts.pl >index 4b32c69..ceb7ef5 100755 >--- a/admin/edi_ean_accounts.pl >+++ b/admin/edi_ean_accounts.pl >@@ -103,13 +103,9 @@ $template->param( > output_html_with_http_headers( $input, $cookie, $template->output ); > > sub delsubmit { >- my $ean = $schema->resultset('EdifactEan')->find( >- { >- branchcode => $input->param('branchcode'), >- ean => $input->param('ean') >- } >- ); >- $ean->delete; >+ my $id = $input->param('id'); >+ my $e = $schema->resultset('EdifactEan')->find( $id ); >+ $e->delete if $e; > return; > } > >@@ -128,7 +124,6 @@ sub addsubmit { > } > > sub editsubmit { >- warn "DESC: " . $input->param('description'); > $schema->resultset('EdifactEan')->search( > { > branchcode => $input->param('oldbranchcode'), >@@ -146,16 +141,8 @@ sub editsubmit { > } > > sub show_ean { >- my $branchcode = $input->param('branchcode'); >- my $ean = $input->param('ean'); >- if ( $branchcode && $ean ) { >- my $e = $schema->resultset('EdifactEan')->find( >- { >- ean => $ean, >- branchcode => $branchcode, >- } >- ); >- $template->param( ean => $e ); >- } >+ my $id = $input->param('id'); >+ my $e = $schema->resultset('EdifactEan')->find( $id ); >+ $template->param( ean => $e ); > return; > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_ean_accounts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_ean_accounts.tt >index 308ebe4..b35beac 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_ean_accounts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_ean_accounts.tt >@@ -117,8 +117,7 @@ > <h3>Delete EAN [% ean.ean %] for [% ean.branch.branchname %]?</h3> > <form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="post"> > <input type="hidden" name="op" value="delete_confirmed" /> >- <input type="hidden" name="branchcode" value="[% ean.branch.branchcode %]" /> >- <input type="hidden" name="ean" value="[% ean.ean %]" /> >+ <input type="hidden" name="id" value="[% ean.ee_id %]" /> > <input type="submit" class="approve" value="Yes, Delete" /> > </form> > <form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="get"> >@@ -152,7 +151,7 @@ > <td align="center"> > <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=ean_form&branchcode=[% ean.branch.branchcode %]&ean=[% ean.ean %]">Edit</a> > | >- <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=delete_confirm&branchcode=[% ean.branch.branchcode %]&ean=[% ean.ean %]">Delete</a> >+ <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=delete_confirm&id=[% ean.id %]">Delete</a> > </td> > </tr> > [% END %] >-- >2.1.4
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 16208
:
50355
|
50356
|
50367
|
50380
|
50394
|
50445
|
50446