From 286bf08d34745c5afb95add35c102dc966a36fc8 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 30 Mar 2007 18:16:41 +0000 Subject: Fixing Form::current_date to return a date in all cases instead of a timestamp (SL bug probably), and adding ' to blacklisted characters in actions git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1017 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Form.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'LedgerSMB') diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 699c8695..a7fa9186 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -92,7 +92,7 @@ sub new { $self->error('Access Denied', __line__, __file__); } - if (($self->{action} =~ /:/) || ($self->{nextsub} =~ /:/)){ + if (($self->{action} =~ /(:|')/) || ($self->{nextsub} =~ /(:|')/)){ $self->error("Access Denied", __line__, __file__); } @@ -2327,8 +2327,8 @@ sub current_date { $dateformat = 'yyyymmdd'; } - $query = qq|SELECT to_date(?, ?) - + ?::interval AS thisdate|; + $query = qq|SELECT (to_date(?, ?) + + ?::interval)::date AS thisdate|; @queryargs = ($thisdate, $dateformat, $days); } else { -- cgit v1.2.3