Birthdays are now transmitted reliably to Diaspora
This commit is contained in:
@@ -1472,7 +1472,7 @@ class DBStructure {
|
||||
"hide-friends" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
|
||||
"name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
|
||||
"pdesc" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
|
||||
"dob" => ["type" => "varchar(32)", "not null" => "1", "default" => "0001-01-01", "comment" => ""],
|
||||
"dob" => ["type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00", "comment" => ""],
|
||||
"address" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
|
||||
"locality" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
|
||||
"region" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
|
||||
|
||||
@@ -4207,10 +4207,14 @@ class Diaspora
|
||||
$searchable = (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false');
|
||||
|
||||
if ($searchable === 'true') {
|
||||
$dob = '1000-00-00';
|
||||
$dob = '';
|
||||
|
||||
if (($profile['dob']) && ($profile['dob'] > '0001-01-01')) {
|
||||
$dob = ((intval($profile['dob'])) ? intval($profile['dob']) : '1000') .'-'. datetime_convert('UTC', 'UTC', $profile['dob'],'m-d');
|
||||
if ($profile['dob'] && ($profile['dob'] > '0000-00-00')) {
|
||||
list($year, $month, $day) = sscanf($profile['dob'], '%4d-%2d-%2d');
|
||||
if ($year < 1004) {
|
||||
$year = 1004;
|
||||
}
|
||||
$dob = datetime_convert('UTC', 'UTC', $year . '-' . $month . '-'. $day, 'Y-m-d');
|
||||
}
|
||||
|
||||
$about = $profile['about'];
|
||||
@@ -4284,7 +4288,7 @@ class Diaspora
|
||||
|
||||
foreach ($recips as $recip) {
|
||||
logger("Send updated profile data for user ".$uid." to contact ".$recip["id"], LOGGER_DEBUG);
|
||||
self::buildAndTransmit($owner, $recip, "profile", $message, false, "", true);
|
||||
self::buildAndTransmit($owner, $recip, "profile", $message, false, "", false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user