diff --git a/index.php b/index.php
index 5d691aa8d5..cec0bf8111 100755
--- a/index.php
+++ b/index.php
@@ -145,23 +145,23 @@
if ($phpgw_info["user"]["apps"]["addressbook"]
&& $phpgw_info["user"]["preferences"]["addressbook"]["mainscreen_showbirthdays"]) {
echo "\n";
- $phpgw->db->query("select ab_firstname,ab_lastname from addressbook where "
- . "ab_bday like '" . $phpgw->common->show_date(time(),"n/d")
- . "/%' and (ab_owner='" . $phpgw_info["user"]["account_id"] . "' or ab_access='"
+ $phpgw->db->query("select a.owner,a.n_given,a.n_family,b.contact_name,b.contact_value from phpgw_addressbook as a, phpgw_addressbook_extra as b where "
+ . "b.contact_name='bday' and b.contact_value like '" . $phpgw->common->show_date(time(),"n/d")
+ . "/%' and (a.owner='" . $phpgw_info["user"]["account_id"] . "' or b.contact_name='access' and b.contact_value ='"
. "public')",__LINE__,__FILE__);
while ($phpgw->db->next_record()) {
echo "
" . lang("Today is x's birthday!", $phpgw->db->f("ab_firstname") . " "
. $phpgw->db->f("ab_lastname")) . " |
\n";
}
- $tommorow = $phpgw->common->show_date(mktime(0,0,0,
+ $tomorrow = $phpgw->common->show_date(mktime(0,0,0,
$phpgw->common->show_date(time(),"m"),
$phpgw->common->show_date(time(),"d")+1,
$phpgw->common->show_date(time(),"Y")),"n/d" );
- $phpgw->db->query("select ab_firstname,ab_lastname from addressbook where "
- . "ab_bday like '$tommorow/%' and (ab_owner='"
- . $phpgw_info["user"]["account_id"] . "' or ab_access='public')",__LINE__,__FILE__);
+ $phpgw->db->query("select a.owner,a.n_given,a.n_family,b.contact_name,b.contact_value from phpgw_addressbook as a, phpgw_addressbook_extra as b where "
+ . "b.contact_name='bday' and b.contact_value like '$tomorrow/%' and (a.owner='"
+ . $phpgw_info["user"]["account_id"] . "' or b.contact_name='access' and b.contact_value='public')",__LINE__,__FILE__);
while ($phpgw->db->next_record()) {
- echo "" . lang("Tommorow is x's birthday.", $phpgw->db->f("ab_firstname") . " "
+ echo " |
" . lang("Tomorrow is x's birthday.", $phpgw->db->f("ab_firstname") . " "
. $phpgw->db->f("ab_lastname")) . " |
\n";
}
echo "\n";