Bugzilla – Attachment 59613 Details for
Bug 17900
Possible SQL injection in patroncards template editing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17900: Update the tests to the new API
Bug-17900-Update-the-tests-to-the-new-API.patch (text/plain), 3.81 KB, created by
Marcel de Rooy
on 2017-01-27 09:53:37 UTC
(
hide
)
Description:
Bug 17900: Update the tests to the new API
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-01-27 09:53:37 UTC
Size:
3.81 KB
patch
obsolete
>From 88ec6f40b5d89e3d91f6c2e1a14d2b9ea81019aa Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 27 Jan 2017 10:01:42 +0100 >Subject: [PATCH] Bug 17900: Update the tests to the new API >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Creators/Lib.t | 22 +++++++++++----------- > 1 file changed, 11 insertions(+), 11 deletions(-) > >diff --git a/t/db_dependent/Creators/Lib.t b/t/db_dependent/Creators/Lib.t >index cd69265..8c61935 100644 >--- a/t/db_dependent/Creators/Lib.t >+++ b/t/db_dependent/Creators/Lib.t >@@ -363,8 +363,8 @@ isnt( exists $templates->[1]->{row_gap}, 0.3, 'row_gap > is ( $templates->[1]->{units}, 'POINT', 'units is good' ); > isnt( exists $templates->[1]->{creator}, 'Labels', 'creator is good' ); > >-# With filter params ------------------ >-$templates = get_all_templates( filter => 'rows = 7' ); >+# With filters params ------------------ >+$templates = get_all_templates( { filters => { rows => 7} } ); > > $query = ' > SELECT count(*) >@@ -396,7 +396,7 @@ is( $templates->[0]->{units}, 'POINT', 'units is good > is( $templates->[0]->{creator}, 'Labels', 'creator is good' ); > > # With orderby param ------------------ >-$templates = get_all_templates( orderby => 'rows DESC' ); >+$templates = get_all_templates( { orderby => 'rows DESC' } ); > > $query = ' > SELECT count(*) >@@ -543,8 +543,8 @@ isnt( exists $layouts->[1]->{format_string}, 'barcode', 'format_string is g > isnt( exists $layouts->[1]->{layout_xml}, 'layout_xml2', 'layout_xml is good' ); > isnt( exists $layouts->[1]->{creator}, 'Labels', 'creator is good' ); > >-# With filter params ------------------ >-$layouts = get_all_layouts( filter => 'font_size = 12' ); >+# With filters params ------------------ >+$layouts = get_all_layouts( { filters => { font_size => 12 } } ); > > $query = ' > SELECT count(*) >@@ -572,7 +572,7 @@ is( $layouts->[0]->{layout_xml}, 'layout_xml2', 'layout_xml is good' ); > is( $layouts->[0]->{creator}, 'Labels', 'creator is good' ); > > # With orderby param ------------------ >-$layouts = get_all_layouts( orderby => 'font_size DESC' ); >+$layouts = get_all_layouts( { orderby => 'font_size DESC' } ); > > $query = ' > SELECT count(*) >@@ -695,8 +695,8 @@ isnt( exists $profiles->[1]->{creep_vert}, 0.5, 'creep_vert is > isnt( exists $profiles->[1]->{units}, 'POINT', 'units is good' ); > isnt( exists $profiles->[1]->{creator}, 'Labels', 'creator is good' ); > >-# With filter params ------------------ >-$profiles = get_all_profiles( filters => { template_id => 1235 } ); >+# With filters params ------------------ >+$profiles = get_all_profiles( { filters => { template_id => 1235 } } ); > > $query = ' > SELECT count(*) >@@ -770,7 +770,7 @@ is( $images->[1]->{type}, $images->[1]->{name}, 'type is good' ); > } > > # Without creator params -------------- >-my $batches = get_batch_summary( creator => 'Labels' ); >+my $batches = get_batch_summary( { filters => { creator => 'Labels' } } ); > > $query = ' > SELECT batch_id, count(batch_id) >@@ -805,8 +805,8 @@ isa_ok( $batches->[1], 'HASH', '$batches->[1] is a HASH' ); > is( $batches->[1]->{batch_id}, 12, 'batch_id is good' ); > is( $batches->[1]->{_item_count}, $count, 'item_number is good for this batch_id' ); > >-# Without filter & creator params ----- >-$batches = get_batch_summary( filter => "branch_code='$library1->{branchcode}'", creator => 'Labels' ); >+# Without filters ----- >+$batches = get_batch_summary( { filters => { branch_code => $library1->{branchcode}, creator => 'Labels' } } ); > is( @$batches, 1, 'There is 1 batch matching' ); > > $query = ' >-- >2.1.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 17900
:
58965
|
59064
|
59603
|
59612
| 59613