mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-11-29 08:56:03 +00:00
Add a primary key to calendar_alarm table.
Also fixed a bug in scripts/refresh-alarms.php if there was an alarm with a duplicate trigger. This is part of the fix for #276.
This commit is contained in:
1 parent
6819d6d7d1
commit
e3b5c331be
5 files changed
+25
-9
No files matched your search
@@ -165,14 +165,14 @@ if ( $qry->Exec() && $qry->rows() ) {
|
||||
|
||||
if ( isset($next) && $next < $expand_range_end ) {
|
||||
if ( $args->debug ) printf( "refresh: Found next alarm instance on '%s'\n", $next->UTC() );
|
||||
$sql = 'UPDATE calendar_alarm SET next_trigger = :next WHERE dav_id = :id AND component = :component';
|
||||
$update = new AwlQuery( $sql, array( ':next' => $next->UTC(), ':id' => $alarm->dav_id, ':component' => $alarm->component ) );
|
||||
$sql = 'UPDATE calendar_alarm SET next_trigger = :next WHERE dav_id = :id AND count = :count AND component = :component';
|
||||
$update = new AwlQuery( $sql, array( ':next' => $next->UTC(), ':id' => $alarm->dav_id, ':count' => $alarm->count, ':component' => $alarm->component ) );
|
||||
$update->Exec('refresh-alarms', __LINE__, __FILE__ );
|
||||
}
|
||||
else if ( $args->set_last && isset($last) && $last < $earliest ) {
|
||||
if ( $args->debug ) printf( "refresh: Found past final alarm instance on '%s'\n", $last->UTC() );
|
||||
$sql = 'UPDATE calendar_alarm SET next_trigger = :last WHERE dav_id = :id AND component = :component';
|
||||
$update = new AwlQuery( $sql, array( ':last' => $last->UTC(), ':id' => $alarm->dav_id, ':component' => $alarm->component ) );
|
||||
$sql = 'UPDATE calendar_alarm SET next_trigger = :last WHERE dav_id = :id AND count = :count AND component = :component';
|
||||
$update = new AwlQuery( $sql, array( ':last' => $last->UTC(), ':id' => $alarm->dav_id, ':count' => $alarm->count, ':component' => $alarm->component ) );
|
||||
$update->Exec('refresh-alarms', __LINE__, __FILE__ );
|
||||
}
|
||||
else if ( $args->debug && isset($next) && $next < $expand_range_end ) {
|
||||
|
||||
Reference in new issue
Block a user