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 /include/diaspora.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 'include/diaspora.php')
-rw-r--r-- | include/diaspora.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/diaspora.php b/include/diaspora.php index 3ab454246..fdf756610 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -1679,6 +1679,12 @@ function diaspora_profile($importer,$xml) { $birthday = datetime_convert('UTC','UTC',$birthday,'Y-m-d'); + // this is to prevent multiple birthday notifications in a single year + // if we already have a stored birthday and the 'm-d' part hasn't changed, preserve the entry, which will preserve the notify year + + if(substr($birthday,5) === substr($contact['bd'],5)) + $birthday = $contact['bd']; + $r = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' , `bd` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1", dbesc($name), dbesc(datetime_convert()), |