aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/diaspora.php')
-rw-r--r--include/diaspora.php6
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()),