Bugzilla – Attachment 92115 Details for
Bug 16219
Runreport.pl should allow SQL parameters to be passed on the command line
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16219: (QA follow-up) Tiny regex change
Bug-16219-QA-follow-up-Tiny-regex-change.patch (text/plain), 1.19 KB, created by
Marcel de Rooy
on 2019-08-09 10:22:41 UTC
(
hide
)
Description:
Bug 16219: (QA follow-up) Tiny regex change
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2019-08-09 10:22:41 UTC
Size:
1.19 KB
patch
obsolete
>From 8405282c998b37bd689c55e73e22f56ee9e4a84e Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 9 Aug 2019 10:17:41 +0000 >Subject: [PATCH] Bug 16219: (QA follow-up) Tiny regex change >Content-Type: text/plain; charset=utf-8 > >The parameter <<>> does not work. There should be text inside. >The construction .*? does not look good completely. >Replacing it by the stricter [^>]+ So, no greater than's and at least one. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/cronjobs/runreport.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/cronjobs/runreport.pl b/misc/cronjobs/runreport.pl >index 89ef2154c1..6732afae9c 100755 >--- a/misc/cronjobs/runreport.pl >+++ b/misc/cronjobs/runreport.pl >@@ -265,7 +265,7 @@ foreach my $report_id (@ARGV) { > } > > # convert SQL parameters to placeholders >- my $params_needed = ( $sql =~ s/(<<.*?>>)/\?/g ); >+ my $params_needed = ( $sql =~ s/(<<[^>]+>>)/\?/g ); > die("You supplied ". scalar @params . " parameter(s) and $params_needed are required by the report") if scalar @params != $params_needed; > > my ($sth) = execute_query( $sql, undef, undef, \@params, $report_id ); >-- >2.11.0
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 16219
:
78434
|
90363
|
91668
|
92113
|
92114
| 92115