diff --git a/index.php b/index.php index 0f641e9db5..23fd7d7983 100755 --- a/index.php +++ b/index.php @@ -126,15 +126,15 @@ . "' and webcal_entry.cal_id = webcal_entry_user.cal_id) and " . "(cal_priority='3')"); $phpgw->db->next_record(); + $check = $phpgw->db->f(0); + if ($check == 1) { + $key = "You have 1 high priority event on your calendar today."; + } + if ($check > 1) { + $key = "You have x high priority events on your calendar today."; + } + if ($check > 0) echo "" . lang_common($key,$check) . ""; - if ($phpgw->db->f(0) == 1) { - echo "" . lang_common("You have 1 high priority event on your calendar today.") - . ""; - } - if ($phpgw->db->f(0) > 1) { - echo "" . lang_common("You have x high priority events on your calendar " - . "today.",$phpgw->db->f(0)) . ""; - } echo "\n"; }