really, truly fix the age missing in directory bug
This commit is contained in:
parent
2ecd5a7632
commit
fd74c5b2ce
@ -53,7 +53,7 @@ function syncdirs($uid) {
|
|||||||
|
|
||||||
logger('syncdirs', LOGGER_DEBUG);
|
logger('syncdirs', LOGGER_DEBUG);
|
||||||
|
|
||||||
$p = q("select channel.channel_hash, profile.* from profile left join channel on channel_id = uid where uid = %d and is_default = 1",
|
$p = q("select channel.channel_hash, channel_timezone, profile.* from profile left join channel on channel_id = uid where uid = %d and is_default = 1",
|
||||||
intval($uid)
|
intval($uid)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -64,6 +64,9 @@ function syncdirs($uid) {
|
|||||||
|
|
||||||
$profile['description'] = $p[0]['pdesc'];
|
$profile['description'] = $p[0]['pdesc'];
|
||||||
$profile['birthday'] = $p[0]['dob'];
|
$profile['birthday'] = $p[0]['dob'];
|
||||||
|
if($age = age($p[0]['dob'],$p[0]['channel_timezone'],''))
|
||||||
|
$profile['age'] = $age;
|
||||||
|
|
||||||
$profile['gender'] = $p[0]['gender'];
|
$profile['gender'] = $p[0]['gender'];
|
||||||
$profile['marital'] = $p[0]['marital'];
|
$profile['marital'] = $p[0]['marital'];
|
||||||
$profile['sexual'] = $p[0]['sexual'];
|
$profile['sexual'] = $p[0]['sexual'];
|
||||||
|
@ -1312,7 +1312,6 @@ function import_directory_profile($hash,$profile) {
|
|||||||
|
|
||||||
$arr['xprof_keywords'] = implode(' ',$clean);
|
$arr['xprof_keywords'] = implode(' ',$clean);
|
||||||
|
|
||||||
|
|
||||||
$r = q("select * from xprof where xprof_hash = '%s' limit 1",
|
$r = q("select * from xprof where xprof_hash = '%s' limit 1",
|
||||||
dbesc($hash)
|
dbesc($hash)
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user