don't show birthday for deleted contact
This commit is contained in:
parent
5eea0d5ecb
commit
d0a86d933f
1 changed files with 18 additions and 19 deletions
35
boot.php
35
boot.php
|
@ -2432,28 +2432,27 @@ function get_birthdays() {
|
||||||
if(strlen($rr['name']))
|
if(strlen($rr['name']))
|
||||||
$total ++;
|
$total ++;
|
||||||
|
|
||||||
$o .= '<div id="birthday-notice" class="birthday-notice fakelink" onclick=openClose(\'birthday-wrapper\'); >' . t('Birthday Reminders') . ' ' . '(' . $total . ')' . '</div>';
|
if($total) {
|
||||||
$o .= '<div id="birthday-wrapper" style="display: none;" ><div id="birthday-title">' . t('Birthdays this week:') . '</div>';
|
$o .= '<div id="birthday-notice" class="birthday-notice fakelink" onclick=openClose(\'birthday-wrapper\'); >' . t('Birthday Reminders') . ' ' . '(' . $total . ')' . '</div>';
|
||||||
$o .= '<div id="birthday-adjust">' . t("\x28Adjusted for local time\x29") . '</div>';
|
$o .= '<div id="birthday-wrapper" style="display: none;" ><div id="birthday-title">' . t('Birthdays this week:') . '</div>';
|
||||||
$o .= '<div id="birthday-title-end"></div>';
|
$o .= '<div id="birthday-adjust">' . t("\x28Adjusted for local time\x29") . '</div>';
|
||||||
|
$o .= '<div id="birthday-title-end"></div>';
|
||||||
|
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
if(! strlen($rr['name']))
|
if(! strlen($rr['name']))
|
||||||
continue;
|
continue;
|
||||||
$now = strtotime('now');
|
$now = strtotime('now');
|
||||||
$today = (((strtotime($rr['start'] . ' +00:00') < $now) && (strtotime($rr['finish'] . ' +00:00') > $now)) ? true : false);
|
$today = (((strtotime($rr['start'] . ' +00:00') < $now) && (strtotime($rr['finish'] . ' +00:00') > $now)) ? true : false);
|
||||||
|
|
||||||
$o .= '<div class="birthday-list" id="birthday-' . $rr['eid'] . '"><a class="sparkle" href="'
|
$o .= '<div class="birthday-list" id="birthday-' . $rr['eid'] . '"><a class="sparkle" href="'
|
||||||
. $a->get_baseurl() . '/redir/' . $rr['cid'] . '">' . $rr['name'] . '</a> '
|
. $a->get_baseurl() . '/redir/' . $rr['cid'] . '">' . $rr['name'] . '</a> '
|
||||||
. day_translate(datetime_convert('UTC', $a->timezone, $rr['start'], $bd_format)) . (($today) ? ' ' . t('[today]') : '')
|
. day_translate(datetime_convert('UTC', $a->timezone, $rr['start'], $bd_format)) . (($today) ? ' ' . t('[today]') : '')
|
||||||
. '</div>' ;
|
. '</div>' ;
|
||||||
|
}
|
||||||
|
$o .= '</div></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$o .= '</div></div>';
|
|
||||||
}
|
}
|
||||||
|
return $o;
|
||||||
return $o;
|
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue