diff --git a/purge.php b/purge.php index c22dbb990..ab62ca386 100644 --- a/purge.php +++ b/purge.php @@ -191,11 +191,9 @@ function purge_events ( $ids ) { ['webcal_entry', 'cal_id']]; //var_dump($tables);exit; - $num = []; $cnt = count ( $tables ); - for ( $i = 0; $i < $cnt; $i++ ) { - $num[$i] = 0; - } + $num = array_fill ( 0, $cnt, 0 ); + foreach ( $ids as $cal_id ) { for ( $i = 0; $i < $cnt; $i++ ) { $clause = ( $cal_id == 'ALL' ? '' :