aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-06-04 21:02:57 -0700
committerfriendica <info@friendica.com>2014-06-04 21:02:57 -0700
commit4fa3b420ab974be301bfe5a5861e00b4d06503b3 (patch)
tree84c244b082a32118c8ec351e802339f9b42c500a
parent6e2208394a61eb4ef0893604a60de03775fe6c86 (diff)
downloadvolse-hubzilla-4fa3b420ab974be301bfe5a5861e00b4d06503b3.tar.gz
volse-hubzilla-4fa3b420ab974be301bfe5a5861e00b4d06503b3.tar.bz2
volse-hubzilla-4fa3b420ab974be301bfe5a5861e00b4d06503b3.zip
duplicate birthday events showing up
-rw-r--r--include/zot.php7
-rw-r--r--mod/notes.php4
2 files changed, 9 insertions, 2 deletions
diff --git a/include/zot.php b/include/zot.php
index 578bdde49..9cdcbf2a4 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -364,6 +364,13 @@ function zot_refresh($them,$channel = null, $force = false) {
if($r) {
+ // if the dob is the same as what we have stored (disregarding the year), keep the one
+ // we have as we may have updated the year after sending a notification; and resetting
+ // to the one we just received would cause us to create duplicated events.
+
+ if(substr($r[0]['abook_dob'],5) == substr($next_birthday,5))
+ $next_birthday = $r[0]['abook_dob'];
+
$current_abook_connected = (($r[0]['abook_flags'] & ABOOK_FLAG_UNCONNECTED) ? 0 : 1);
$y = q("update abook set abook_their_perms = %d, abook_dob = '%s'
diff --git a/mod/notes.php b/mod/notes.php
index e21e4386c..84f8a7093 100644
--- a/mod/notes.php
+++ b/mod/notes.php
@@ -1,9 +1,9 @@
<?php /** @file */
function notes_init(&$a) {
+
if(! local_user())
return;
- logger('mod_notes: ' . print_r($_REQUEST,true));
$ret = array('success' => true);
if($_REQUEST['note_text'] || $_REQUEST['note_text'] == '') {
@@ -18,7 +18,7 @@ function notes_init(&$a) {
build_sync_packet();
}
- logger('notes saved.');
+ logger('notes saved.', LOGGER_DEBUG);
json_return_and_die($ret);
}