[freeside-commits] branch FREESIDE_3_BRANCH updated. 223baf5004076bc4bc67c8c5ac48b35d3d00a171
Mark Wells
mark at 420.am
Fri Jun 27 15:09:13 PDT 2014
The branch, FREESIDE_3_BRANCH has been updated
via 223baf5004076bc4bc67c8c5ac48b35d3d00a171 (commit)
from 43dcceb2c6bfe6a82fa4c5704a379f80063219c9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 223baf5004076bc4bc67c8c5ac48b35d3d00a171
Author: Mark Wells <mark at freeside.biz>
Date: Fri Jun 27 15:08:49 2014 -0700
fix day_of_month condition on mysql, #28895
diff --git a/FS/FS/part_event/Condition/day_of_month.pm b/FS/FS/part_event/Condition/day_of_month.pm
index 61cd8d6..036cb70 100644
--- a/FS/FS/part_event/Condition/day_of_month.pm
+++ b/FS/FS/part_event/Condition/day_of_month.pm
@@ -29,7 +29,11 @@ sub condition_sql {
my( $class, $table, %opt ) = @_;
my $today = (localtime($opt{'time'}))[3];
my $day = $class->condition_sql_option('day');
- "$today = ANY( string_to_array($day, ',')::integer[] )"
+ if ($opt{'driver_name'} eq 'Pg') {
+ "$today = ANY( string_to_array($day, ',')::integer[] )";
+ } elsif ( $opt{'driver_name'} eq 'mysql' ) {
+ "find_in_set($today, $day) > 0";
+ }
}
1;
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_event/Condition/day_of_month.pm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list