aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-05-10 20:53:04 -0700
committerFriendika <info@friendika.com>2011-05-10 20:53:04 -0700
commitd0a86d933f99832ffa2f081a619308e173911f8a (patch)
tree87bc0880534276411b6c589009d6e88f632892d8
parent5eea0d5ecb7d98ebc70c038d23c87442d8200310 (diff)
downloadvolse-hubzilla-d0a86d933f99832ffa2f081a619308e173911f8a.tar.gz
volse-hubzilla-d0a86d933f99832ffa2f081a619308e173911f8a.tar.bz2
volse-hubzilla-d0a86d933f99832ffa2f081a619308e173911f8a.zip
don't show birthday for deleted contact
-rw-r--r--boot.php39
1 files changed, 19 insertions, 20 deletions
diff --git a/boot.php b/boot.php
index 12d392b44..c9b22bbb8 100644
--- a/boot.php
+++ b/boot.php
@@ -2432,28 +2432,27 @@ function get_birthdays() {
if(strlen($rr['name']))
$total ++;
- $o .= '<div id="birthday-notice" class="birthday-notice fakelink" onclick=openClose(\'birthday-wrapper\'); >' . t('Birthday Reminders') . ' ' . '(' . $total . ')' . '</div>';
- $o .= '<div id="birthday-wrapper" style="display: none;" ><div id="birthday-title">' . t('Birthdays this week:') . '</div>';
- $o .= '<div id="birthday-adjust">' . t("\x28Adjusted for local time\x29") . '</div>';
- $o .= '<div id="birthday-title-end"></div>';
-
- foreach($r as $rr) {
- if(! strlen($rr['name']))
- continue;
- $now = strtotime('now');
- $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="'
- . $a->get_baseurl() . '/redir/' . $rr['cid'] . '">' . $rr['name'] . '</a> '
- . day_translate(datetime_convert('UTC', $a->timezone, $rr['start'], $bd_format)) . (($today) ? ' ' . t('[today]') : '')
- . '</div>' ;
+ if($total) {
+ $o .= '<div id="birthday-notice" class="birthday-notice fakelink" onclick=openClose(\'birthday-wrapper\'); >' . t('Birthday Reminders') . ' ' . '(' . $total . ')' . '</div>';
+ $o .= '<div id="birthday-wrapper" style="display: none;" ><div id="birthday-title">' . t('Birthdays this week:') . '</div>';
+ $o .= '<div id="birthday-adjust">' . t("\x28Adjusted for local time\x29") . '</div>';
+ $o .= '<div id="birthday-title-end"></div>';
+
+ foreach($r as $rr) {
+ if(! strlen($rr['name']))
+ continue;
+ $now = strtotime('now');
+ $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="'
+ . $a->get_baseurl() . '/redir/' . $rr['cid'] . '">' . $rr['name'] . '</a> '
+ . day_translate(datetime_convert('UTC', $a->timezone, $rr['start'], $bd_format)) . (($today) ? ' ' . t('[today]') : '')
+ . '</div>' ;
+ }
+ $o .= '</div></div>';
}
-
- $o .= '</div></div>';
}
-
- return $o;
-
+ return $o;
}}