[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kronolith
Subject:    [kronolith] new patch concerning listAlarms
From:       "W. Tasin" <tasin () fhm ! edu>
Date:       2004-04-03 12:49:15
Message-ID: 406EB2CB.5080608 () fhm ! edu
[Download RAW message or body]

Hi,

here is the patch which fixes a typo and the compare function.

Now with all my patches (including the "identity"-one) I will be alerted 
by mail, but I will be flooded with mails, because the "seen"-stuff 
inside reminder.php was intended to work on a daemon.

So my question now is how should this be handled?
Make reminder.php again a daemon? Saving this information inside the 
database (and what about the mcal-backend)?

For the sql backend I could have a look at it trying to make it work (if 
desired).

Ciao

Walter

["kronolith.diff" (text/plain)]

--- /home/tasin/horde/CVS-HORDE/horde/kronolith/lib/Kronolith.php	Sat Apr  3 06:40:27 2004
+++ kronolith/lib/Kronolith.php	Sat Apr  3 08:03:11 2004
@@ -792,9 +792,9 @@
         $second = Kronolith::dateObject($second);
 
         $diff = Kronolith::compareDates($first, $second);
-        if (!$diff) {
-            return 0;
-        } elseif ($first->house != $second->hour) {
+        if ($diff) {
+            return $diff;
+        } elseif ($first->hour != $second->hour) {
             return $first->hour - $second->hour;
         } elseif ($first->min != $second->min) {
             return $first->min - $second->min;


["sql.diff" (text/plain)]

--- kronolith/lib/Driver/sql.php	Fri Apr  2 18:07:33 2004
+++ kronolith/lib/Driver/sql.php	Fri Apr  2 21:55:54 2004
@@ -54,8 +54,8 @@
                 $start = &Kronolith::dateObject($event->start);
                 $start->min -= $event->getAlarm();
                 $start->correct();
-                if (Kronolith::compareDateTimes($start, $date) == -1 &&
-                    Kronolith::compareDateTimes($date, $event->end) == -1) {
+                if (Kronolith::compareDateTimes($start, $date) <= 0 &&
+                    Kronolith::compareDateTimes($date, $event->end) <= -1) {
                     $events[] = $eventId;
                 }
             } else {
@@ -63,13 +63,13 @@
                     $start = &Kronolith::dateObject($next);
                     $start->min -= $event->getAlarm();
                     $start->correct();
-                    if (Kronolith::compareDateTimes($start, $date) == -1 &&
+                    if (Kronolith::compareDateTimes($start, $date) <= 0 &&
                         Kronolith::compareDateTimes($date, \
                Kronolith::dateObject(array('year' => $next->year,
                                                                                      \
                'month' => $next->month,
                                                                                      \
                'mday' => $next->mday,
                                                                                      \
                'hour' => $event->end->hour,
                                                                                      \
                'min' => $event->end->min,
-                                                                                     \
'sec' => $event->end->sec)) == -1)) { +                                               \
'sec' => $event->end->sec)) <= -1)) {  $events[] = $eventId;
                     }
                 }



-- 
Kronolith mailing list - Join the hunt: http://horde.org/bounties/#kronolith
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: kronolith-unsubscribe@lists.horde.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic