An incredibly unimportant optimization (maybe) in the way high priority

events are listed in the starting page.
This commit is contained in:
sgbeal 2000-08-18 23:27:45 +00:00
parent 581d1bcd47
commit 1529d1b00b

View File

@ -126,15 +126,15 @@
. "' and webcal_entry.cal_id = webcal_entry_user.cal_id) and " . "' and webcal_entry.cal_id = webcal_entry_user.cal_id) and "
. "(cal_priority='3')"); . "(cal_priority='3')");
$phpgw->db->next_record(); $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 "<tr><td>" . lang_common($key,$check) . "</td></tr>";
if ($phpgw->db->f(0) == 1) {
echo "<tr><td>" . lang_common("You have 1 high priority event on your calendar today.")
. "</td></tr>";
}
if ($phpgw->db->f(0) > 1) {
echo "<tr><td>" . lang_common("You have x high priority events on your calendar "
. "today.",$phpgw->db->f(0)) . "</td></tr>";
}
echo "<!-- Calendar info -->\n"; echo "<!-- Calendar info -->\n";
} }