Bugzilla – Attachment 40777 Details for
Bug 14382
datepicker's dateFormat setting for reports is missing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14382: [QA Follow-up] Bad regex alarm
Bug-14382-QA-Follow-up-Bad-regex-alarm.patch (text/plain), 1.47 KB, created by
Marcel de Rooy
on 2015-07-03 09:28:50 UTC
(
hide
)
Description:
Bug 14382: [QA Follow-up] Bad regex alarm
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2015-07-03 09:28:50 UTC
Size:
1.47 KB
patch
obsolete
>From e08a9b32850468b6b54b5333d91e5793f86a4714 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 3 Jul 2015 11:02:22 +0200 >Subject: [PATCH] Bug 14382: [QA Follow-up] Bad regex alarm >Content-Type: text/plain; charset=utf-8 > >The regex /|date>>/ will match much more than you like :) >The unescaped pipe is bad, but you also need to remove the >> because >the split a few lines above it removes them already. > >This allows you to recover from an error like this one, running another >report with a string parameter: >The given date (india%) does not match the date format (us) at >Koha/DateUtils.pm line 144. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > reports/guided_reports.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index 25d9929..10ea112 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -754,7 +754,7 @@ elsif ($phase eq 'Run this report'){ > my $quoted = $sql_params[$i]; > # if there are special regexp chars, we must \ them > $split[$i*2+1] =~ s/(\||\?|\.|\*|\(|\)|\%)/\\$1/g; >- if ($split[$i*2+1] =~ /|date>>/) { >+ if ($split[$i*2+1] =~ /\|date$/) { > $quoted = output_pref({ dt => dt_from_string($quoted), dateformat => 'iso', dateonly => 1 }) if $quoted; > } > $quoted = C4::Context->dbh->quote($quoted); >-- >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 14382
:
40127
|
40130
|
40157
|
40357
|
40358
|
40360
|
40593
|
40594
|
40611
|
40684
|
40691
|
40776
|
40777
|
40781