Bug 9272: Eliminate error when deleting authorized value
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 12 Dec 2012 15:47:37 +0000 (16:47 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sat, 29 Dec 2012 01:10:55 +0000 (20:10 -0500)
Try to delete an authorized value. if you don't get any error, this
patch works.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Enabled debug, tried with and without Plack, works fine for both.

Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Works as advertised. Follows coding guidelines.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
admin/authorised_values.pl

index 9e90182..c00bb64 100755 (executable)
@@ -224,8 +224,6 @@ 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->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;
                                                                                                        # END $OP eq DELETE_CONFIRMED