diff --git a/calendar/setup/tables_update.inc.php b/calendar/setup/tables_update.inc.php index db11543097..7506d75929 100644 --- a/calendar/setup/tables_update.inc.php +++ b/calendar/setup/tables_update.inc.php @@ -2583,7 +2583,7 @@ function calendar_upgrade14_3() $email.'='.$GLOBALS['egw_setup']->db->quote($row['email']), ), __LINE__, __FILE__, 'ORDER BY cal_status') as $user) // order A, T, U, X { - if (strpos($user['email'], '@') !== false && $n++) continue; + if (strpos($user['email'], '@') !== false && !$n++) continue; $GLOBALS['egw_setup']->db->delete('egw_cal_user', array_intersect_key($user, array_flip(array('cal_id','cal_recur_date','cal_user_type','cal_user_id','cal_status')))); } }