[dev] [kronolith-patch] remove warning in exported CSV
Francois Marier
francois at nit.ca
Fri Aug 6 18:15:30 PDT 2004
The Kronolith export function dumps a PHP warning in the resulting CSV
file.
This patch removes the warning, although I'm sure there's something
better than "!($start_date === 0)"...
Francois
-------------- next part --------------
diff -rpuN -X ../ignorelist ../build/kronolith/lib/Driver/sql.php kronolith/lib/Driver/sql.php
--- ../build/kronolith/lib/Driver/sql.php Sun Aug 1 21:09:56 2004
+++ kronolith/lib/Driver/sql.php Fri Aug 6 21:11:27 2004
@@ -136,10 +136,9 @@ class Kronolith_Driver_sql extends Krono
list($endInterval->mday, $endInterval->month, $endInterval->year) = explode('/', Date_Calc::nextDay($endDate->mday, $endDate->month, $endDate->year, '%d/%m/%Y'));
}
+ $startInterval = &new Horde_Date(array('mday' => 1, 'month' => 1, 'year' => 0000));
if (isset($startDate)) {
- if ($startDate === 0) {
- $startInterval = &new Horde_Date(array('mday' => 1, 'month' => 1, 'year' => 0000));
- } else {
+ if (!($startDate === 0)) {
$startInterval = &new Horde_Date($startDate);
}
if ($startInterval->month == 0) {
More information about the dev
mailing list