Bugzilla – Attachment 15480 Details for
Bug 9455
Embedded mysql quotes in sql string
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 9455: Remove unnecessary quoting from sql
PASSED-QA-Bug-9455-Remove-unnecessary-quoting-from.patch (text/plain), 1.85 KB, created by
Katrin Fischer
on 2013-02-17 18:11:10 UTC
(
hide
)
Description:
[PASSED QA] Bug 9455: Remove unnecessary quoting from sql
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-02-17 18:11:10 UTC
Size:
1.85 KB
patch
obsolete
>From 12b21764f5fe55f811bb9f0e473c22329cc69a64 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Wed, 23 Jan 2013 10:31:31 +0000 >Subject: [PATCH] [PASSED QA] Bug 9455: Remove unnecessary quoting from sql > >Wa've removed the mysql specific back quotes from sql files >But this case remained of them embedded in an sql string >Also removed the unnecessary call to finish >and temporary variable in the subroutine return > >Testing: Functionality should remain unchanged. Retrieval of >basketgroups in acquisitions should not be affected > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Works according to test instructions: Basketgroups >functionality appears to work normally. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Checked SQL produces the same results as before and did some >tests on the basket group functionality. >--- > C4/Acquisition.pm | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 376a20b..4a9eae6 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -801,14 +801,12 @@ Returns a reference to the array of all the basketgroups of bookseller $booksell > > sub GetBasketgroups { > my $booksellerid = shift; >- die "bookseller id is required to edit a basketgroup" unless $booksellerid; >- my $query = "SELECT * FROM aqbasketgroups WHERE booksellerid=? ORDER BY `id` DESC"; >+ die 'bookseller id is required to edit a basketgroup' unless $booksellerid; >+ my $query = 'SELECT * FROM aqbasketgroups WHERE booksellerid=? ORDER BY id DESC'; > my $dbh = C4::Context->dbh; > my $sth = $dbh->prepare($query); > $sth->execute($booksellerid); >- my $results = $sth->fetchall_arrayref({}); >- $sth->finish; >- return $results >+ return $sth->fetchall_arrayref({}); > } > > #------------------------------------------------------------# >-- >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 9455
:
14777
|
14897
| 15480