From fd74c5b2ce303ba7018b139c033c6f92ea134751 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 2 Jul 2013 22:41:17 -0700 Subject: really, truly fix the age missing in directory bug --- include/dir_fns.php | 5 ++++- include/zot.php | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/dir_fns.php b/include/dir_fns.php index 5a1d671cb..0b678fd91 100644 --- a/include/dir_fns.php +++ b/include/dir_fns.php @@ -53,7 +53,7 @@ function syncdirs($uid) { 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) ); @@ -64,6 +64,9 @@ function syncdirs($uid) { $profile['description'] = $p[0]['pdesc']; $profile['birthday'] = $p[0]['dob']; + if($age = age($p[0]['dob'],$p[0]['channel_timezone'],'')) + $profile['age'] = $age; + $profile['gender'] = $p[0]['gender']; $profile['marital'] = $p[0]['marital']; $profile['sexual'] = $p[0]['sexual']; diff --git a/include/zot.php b/include/zot.php index 2e3b01149..f9b40c06f 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1312,7 +1312,6 @@ function import_directory_profile($hash,$profile) { $arr['xprof_keywords'] = implode(' ',$clean); - $r = q("select * from xprof where xprof_hash = '%s' limit 1", dbesc($hash) ); -- cgit v1.2.3