projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bc093fd
)
fix data type issue, #11834
author
mark
<mark>
Thu, 24 Mar 2011 23:25:08 +0000
(23:25 +0000)
committer
mark
<mark>
Thu, 24 Mar 2011 23:25:08 +0000
(23:25 +0000)
FS/FS/part_event/Condition.pm
patch
|
blob
|
history
FS/FS/part_event/Condition/times.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_event/Condition.pm
b/FS/FS/part_event/Condition.pm
index
90b8385
..
9155a7d
100644
(file)
--- a/
FS/FS/part_event/Condition.pm
+++ b/
FS/FS/part_event/Condition.pm
@@
-457,6
+457,18
@@
sub age2seconds_sql {
}
}
+=item condition_sql_option_integer
+
+As I<condition_sql_option>, but cast the option value to an integer so that
+comparison to other integers is type-correct.
+
+=cut
+
+sub condition_sql_option_integer {
+ my ($class, $option) = @_;
+ 'CAST ('.$class->condition_sql_option($option).' AS INTEGER)';
+}
+
=head1 NEW CONDITION CLASSES
A module should be added in FS/FS/part_event/Condition/ which implements the
=head1 NEW CONDITION CLASSES
A module should be added in FS/FS/part_event/Condition/ which implements the
diff --git
a/FS/FS/part_event/Condition/times.pm
b/FS/FS/part_event/Condition/times.pm
index
428a2cb
..
91212e7
100644
(file)
--- a/
FS/FS/part_event/Condition/times.pm
+++ b/
FS/FS/part_event/Condition/times.pm
@@
-49,7
+49,7
@@
sub condition_sql {
AND status != 'failed'
)";
AND status != 'failed'
)";
- "$existing <= ". $class->condition_sql_option('run_times');
+ "$existing <= ". $class->condition_sql_option
_integer
('run_times');
}
}