From 0f23c6e75d3317bde278e22b33bb86fb6d2f9485 Mon Sep 17 00:00:00 2001 From: rangi Date: Tue, 26 Feb 2002 09:31:14 +0000 Subject: [PATCH] Fixed apostrophe ' handling --- C4/Maintainance.pm | 4 +++- maint/catmaintain.pl | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/C4/Maintainance.pm b/C4/Maintainance.pm index 2ab4d63a28..d400536858 100644 --- a/C4/Maintainance.pm +++ b/C4/Maintainance.pm @@ -75,7 +75,9 @@ sub listsubjects { sub updatesub{ my ($sub,$oldsub)=@_; my $dbh=C4Connect; - my $query="update bibliosubject set subject='$sub' where subject='$oldsub'"; + $sub=$dbh->quote($sub); + $oldsub=$dbh->quote($oldsub); + my $query="update bibliosubject set subject=$sub where subject=$oldsub"; my $sth=$dbh->prepare($query); $sth->execute; $sth->finish; diff --git a/maint/catmaintain.pl b/maint/catmaintain.pl index 9202fc205a..29445cb2ae 100755 --- a/maint/catmaintain.pl +++ b/maint/catmaintain.pl @@ -24,6 +24,7 @@ if ($type eq 'allsub'){ for (my $i=0;$i<$count;$i++){ my $sub2=$results->[$i]->{'subject'}; $sub2=~ s/ /%20/g; + $sub2=~ s/\'/%27/g; print "\"$results->[$i]->{'subject'}\"
\n"; } } elsif ($type eq 'modsub'){ @@ -84,6 +85,7 @@ if ($type eq 'allsub'){ print "
"; print ""; print "Show all Titles beginning with
"; + print "Item Number
"; print ""; print "
"; print "

"; -- 2.39.5