Bugzilla – Attachment 14038 Details for
Bug 9272
Plack goes into paroxysms of horror when faced with deleting an authorized value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9272: Eliminate error when deleting authorized value
Bug-9272-Eliminate-error-when-deleting-authorized-.patch (text/plain), 1.71 KB, created by
Jared Camins-Esakov
on 2012-12-12 13:43:28 UTC
(
hide
)
Description:
Bug 9272: Eliminate error when deleting authorized value
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-12-12 13:43:28 UTC
Size:
1.71 KB
patch
obsolete
>From 544628cd9907734c46304314b7019b753ac95e89 Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Wed, 12 Dec 2012 08:39:44 -0500 >Subject: [PATCH] Bug 9272: Eliminate error when deleting authorized value > >Prior to this patch, when DEBUG was turned on, any attempt to delete >an authorized value from the staff client interface resulted in a DBD >error: > DBD::mysql::st execute failed: Unknown column 'id' in 'where clause' at > /home/jcamins/kohaclone/admin/authorised_values.pl line 228. > at /home/jcamins/kohaclone/admin/authorised_values.pl line 300 > >This patch corrects a column name so that the error won't occur. > >To test: >1) Set the environment variable DEBUG to true for your Koha VirtualHost > with "SetEnv DEBUG 1" >2) Reload Apache >3) Try to delete an authorized value. Note you get an error even though > the authorized value is deleted. >4) Apply patch. >5) Repeat step 3, noticing that this time there is no error. >--- > admin/authorised_values.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/admin/authorised_values.pl b/admin/authorised_values.pl >index 9e90182..206a2c2 100755 >--- a/admin/authorised_values.pl >+++ b/admin/authorised_values.pl >@@ -224,7 +224,7 @@ if ($op eq 'add_form') { > my $id = $input->param('id'); > my $sth=$dbh->prepare("delete from authorised_values where id=?"); > $sth->execute($id); >- $sth = $dbh->prepare("DELETE FROM authorised_values_branches WHERE id = ?"); >+ $sth = $dbh->prepare("DELETE FROM authorised_values_branches WHERE av_id = ?"); > $sth->execute($id); > print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=authorised_values.pl?searchfield=$searchfield&offset=$offset\"></html>"; > exit; >-- >1.7.9.5
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 9272
:
14038
|
14044
|
14106
|
14313