Bugzilla – Attachment 19664 Details for
Bug 10590
in opac-topissues limit param is not protected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10590 - parameterise the limit option
Bug-10590---parameterise-the-limit-option.patch (text/plain), 1.74 KB, created by
Galen Charlton
on 2013-07-15 14:18:34 UTC
(
hide
)
Description:
Bug 10590 - parameterise the limit option
Filename:
MIME Type:
Creator:
Galen Charlton
Created:
2013-07-15 14:18:34 UTC
Size:
1.74 KB
patch
obsolete
>From edf4cde23fd5d4e94ce28bc3eec8dabeb675bc56 Mon Sep 17 00:00:00 2001 >From: Robin Sheat <robin@catalyst.net.nz> >Date: Tue, 16 Jul 2013 02:06:40 +1200 >Subject: [PATCH] Bug 10590 - parameterise the limit option > >The limit option was previously substituted directly into the query. The >previous patch on bug 10590 filters it on input, but there's no reason >not to have it made to work properly in the query for added safety. > >To test: > >[1] Go to the top checkouts report (http://OPAC/cgi-bin/koha/opac-topissues.pl) >[2] Run the report several times, varying the filters on > number of results and item type. >[3] Verify the the list of top checkouts appears to be correct. > >Signed-off-by: Galen Charlton <gmc@esilibrary.com> >--- > opac/opac-topissues.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl >index 41d7c84..96b0c8f 100755 >--- a/opac/opac-topissues.pl >+++ b/opac/opac-topissues.pl >@@ -82,7 +82,7 @@ if($advanced_search_types eq 'ccode'){ > GROUP BY biblio.biblionumber > HAVING tot >0 > ORDER BY tot DESC >- LIMIT $limit >+ LIMIT ? > "; > $template->param(ccodesearch => 1); > }else{ >@@ -107,13 +107,13 @@ if($advanced_search_types eq 'ccode'){ > GROUP BY biblio.biblionumber > HAVING tot >0 > ORDER BY tot DESC >- LIMIT $limit >+ LIMIT ? > "; > $template->param(itemtypesearch => 1); > } > > my $sth = $dbh->prepare($query); >-$sth->execute(); >+$sth->execute($limit); > my @results; > while (my $line= $sth->fetchrow_hashref) { > push @results, $line; >-- >1.7.10.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 10590
:
19646
|
19659
|
19660
|
19661
|
19662
|
19663
|
19664
|
19665
|
19666
|
19667
|
19668
|
19669
|
19670
|
19671