diff options
author | friendica <info@friendica.com> | 2012-12-27 23:33:37 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-12-27 23:33:37 -0800 |
commit | dda4d689bbdd871f5bd8809ce5381aaee5004d5b (patch) | |
tree | b70722cf3b35db85aa30ce61e902c592583a7b08 /mod | |
parent | 55e77a57d0ea20844b481ff9b194bdf424857c5e (diff) | |
download | volse-hubzilla-dda4d689bbdd871f5bd8809ce5381aaee5004d5b.tar.gz volse-hubzilla-dda4d689bbdd871f5bd8809ce5381aaee5004d5b.tar.bz2 volse-hubzilla-dda4d689bbdd871f5bd8809ce5381aaee5004d5b.zip |
This was bloody hard to sort out.... but now it's sorted and we can move forward again. Put back xtag for efficient keyword searching, use it in conjunction with xprof['keywords'] to avoid a SQL triple join and group_concat (which simply won't scale on a directory server), figured out how best to work timezone corrected birthdays into the protocol. The directory can even provide an age if one was provided to it. Both of these things need some more work, but we have the mechanisms and a plan how to do it right instead of "how the !@#$ are we going to do pull this off?"
Diffstat (limited to 'mod')
-rw-r--r-- | mod/zfinger.php | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/mod/zfinger.php b/mod/zfinger.php index 72f680c1c..d9fe91765 100644 --- a/mod/zfinger.php +++ b/mod/zfinger.php @@ -81,15 +81,17 @@ function zfinger_init(&$a) { $profile = array(); if($p) { - $profile['description'] = $p[0]['pdesc']; - $profile['birthday'] = $p[0]['dob']; - $profile['gender'] = $p[0]['gender']; - $profile['marital'] = $p[0]['marital']; - $profile['sexual'] = $p[0]['sexual']; - $profile['locale'] = $p[0]['locality']; - $profile['region'] = $p[0]['region']; - $profile['postcode'] = $p[0]['postal_code']; - $profile['country'] = $p[0]['country_name']; + $profile['description'] = $p[0]['pdesc']; + $profile['birthday'] = $p[0]['dob']; + if($profile['birthday'] != '0000-00-00') + $profile['next_birthday'] = z_birthday($p[0]['dob'],$e['channel_timezone']); + $profile['gender'] = $p[0]['gender']; + $profile['marital'] = $p[0]['marital']; + $profile['sexual'] = $p[0]['sexual']; + $profile['locale'] = $p[0]['locality']; + $profile['region'] = $p[0]['region']; + $profile['postcode'] = $p[0]['postal_code']; + $profile['country'] = $p[0]['country_name']; if($p[0]['keywords']) { $tags = array(); $k = explode(' ',$p[0]['keywords']); |