Merge remote-tracking branch 'upstream/master'
Conflicts: boot.php include/dba/dba_driver.php include/diaspora.php include/follow.php include/session.php include/zot.php mod/photos.php mod/ping.php
This commit is contained in:
@@ -234,6 +234,22 @@ function profiles_post(&$a) {
|
||||
}
|
||||
|
||||
$dob = $_POST['dob'] ? escape_tags(trim($_POST['dob'])) : '0000-00-00'; // FIXME: Needs to be validated?
|
||||
|
||||
$y = substr($dob,0,4);
|
||||
if((! ctype_digit($y)) || ($y < 1900))
|
||||
$ignore_year = true;
|
||||
else
|
||||
$ignore_year = false;
|
||||
|
||||
if($dob != '0000-00-00') {
|
||||
if(strpos($dob,'0000-') === 0) {
|
||||
$ignore_year = true;
|
||||
$dob = substr($dob,5);
|
||||
}
|
||||
$dob = datetime_convert('UTC','UTC',(($ignore_year) ? '1900-' . $dob : $dob),(($ignore_year) ? 'm-d' : 'Y-m-d'));
|
||||
if($ignore_year)
|
||||
$dob = '0000-' . $dob;
|
||||
}
|
||||
|
||||
$name = escape_tags(trim($_POST['name']));
|
||||
|
||||
@@ -514,6 +530,8 @@ function profiles_post(&$a) {
|
||||
}
|
||||
|
||||
if($is_default) {
|
||||
// reload the info for the sidebar widget - why does this not work?
|
||||
profile_load($a,$channel['channel_address']);
|
||||
proc_run('php','include/directory.php',local_user());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user