25 lines
1.2 KiB
Plaintext
25 lines
1.2 KiB
Plaintext
$OpenBSD: patch-lib_Driver_sql_php,v 1.3 2008/12/07 12:36:06 mbalmer Exp $
|
|
--- lib/Driver/sql.php.orig Wed Sep 3 22:29:54 2008
|
|
+++ lib/Driver/sql.php Sun Dec 7 13:33:33 2008
|
|
@@ -307,16 +307,16 @@ class Kronolith_Driver_sql extends Kronolith_Driver {
|
|
$etime = sprintf('%04d-%02d-%02d 00:00:00', $endInterval->year, $endInterval->month, $endInterval->mday);
|
|
if (isset($startInterval)) {
|
|
$stime = sprintf('%04d-%02d-%02d 00:00:00', $startInterval->year, $startInterval->month, $startInterval->mday);
|
|
- $q .= 'event_end > ? AND ';
|
|
+ $q .= 'event_end > CAST(? as timestamp) AND ';
|
|
$values[] = $stime;
|
|
}
|
|
- $q .= 'event_start < ?) OR (';
|
|
+ $q .= 'event_start < CAST(? as timestamp)) OR (';
|
|
$values[] = $etime;
|
|
if (isset($stime)) {
|
|
- $q .= 'event_recurenddate >= ? AND ';
|
|
+ $q .= 'event_recurenddate >= CAST(? as timestamp) AND ';
|
|
$values[] = $stime;
|
|
}
|
|
- $q .= 'event_start <= ?' .
|
|
+ $q .= 'event_start <= CAST(? as timestamp)' .
|
|
' AND event_recurtype <> ?))';
|
|
array_push($values, $etime, HORDE_DATE_RECUR_NONE);
|
|
|