summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-30 18:16:41 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-30 18:16:41 +0000
commit286bf08d34745c5afb95add35c102dc966a36fc8 (patch)
tree674ec4fd9d1122ec18a41d978187aaf863101ef5 /LedgerSMB
parentda23c10d552b78f3259627df2491cd642aefe98f (diff)
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
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-xLedgerSMB/Form.pm6
1 files changed, 3 insertions, 3 deletions
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 {