[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1017] branches/1.2/LedgerSMB/Form.pm



Revision: 1017
          http://svn.sourceforge.net/ledger-smb/?rev=1017&view=rev
Author:   einhverfr
Date:     2007-03-30 11:16:41 -0700 (Fri, 30 Mar 2007)

Log Message:
-----------
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

Modified Paths:
--------------
    branches/1.2/LedgerSMB/Form.pm

Modified: branches/1.2/LedgerSMB/Form.pm
===================================================================
--- branches/1.2/LedgerSMB/Form.pm	2007-03-30 18:16:06 UTC (rev 1016)
+++ branches/1.2/LedgerSMB/Form.pm	2007-03-30 18:16:41 UTC (rev 1017)
@@ -92,7 +92,7 @@
 		$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 @@
 			$dateformat = 'yyyymmdd';
 		}
 
-		$query = qq|SELECT to_date(?, ?) 
-				+ ?::interval AS thisdate|;
+		$query = qq|SELECT (to_date(?, ?) 
+				+ ?::interval)::date AS thisdate|;
 		@queryargs = ($thisdate, $dateformat, $days);
 
 	} else {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.