diff options
author | friendica <info@friendica.com> | 2011-12-19 19:06:25 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2011-12-19 19:06:25 -0800 |
commit | 63f66a5a93661cfc327449561a2150aa8187a228 (patch) | |
tree | 2db275059113e5a29e13e657f342af8f88516504 /boot.php | |
parent | 79f3bbbf2b0e41db2653f9d0fd4eb7520ba58a25 (diff) | |
download | volse-hubzilla-63f66a5a93661cfc327449561a2150aa8187a228.tar.gz volse-hubzilla-63f66a5a93661cfc327449561a2150aa8187a228.tar.bz2 volse-hubzilla-63f66a5a93661cfc327449561a2150aa8187a228.zip |
bug 244 multiple birthday reminders from Diaspora if profile changed repeatedly
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1036,6 +1036,8 @@ function get_birthdays() { if($r && count($r)) { $total = 0; $now = strtotime('now'); + $cids = array(); + $istoday = false; foreach($r as $rr) { if(strlen($rr['name'])) @@ -1052,6 +1054,13 @@ function get_birthdays() { foreach($r as $rr) { if(! strlen($rr['name'])) continue; + + // avoid duplicates + + if(in_array($rr['cid'],$cids)) + continue; + $cids[] = $rr['cid']; + $today = (((strtotime($rr['start'] . ' +00:00') < $now) && (strtotime($rr['finish'] . ' +00:00') > $now)) ? true : false); $sparkle = ''; $url = $rr['url']; |