diff options
author | friendica <info@friendica.com> | 2014-06-02 17:49:19 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-06-02 17:49:19 -0700 |
commit | 2386bc4d00bac9a1ad1ae50380c351f46e4ca5c2 (patch) | |
tree | 5edc87644a619013e46a0b055f630e1eef82bb33 /mod | |
parent | 576c36c56fd1e14deb2f1c9072988a45bab355cc (diff) | |
download | volse-hubzilla-2386bc4d00bac9a1ad1ae50380c351f46e4ca5c2.tar.gz volse-hubzilla-2386bc4d00bac9a1ad1ae50380c351f46e4ca5c2.tar.bz2 volse-hubzilla-2386bc4d00bac9a1ad1ae50380c351f46e4ca5c2.zip |
bring back birthdays
Diffstat (limited to 'mod')
-rw-r--r-- | mod/zfinger.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/mod/zfinger.php b/mod/zfinger.php index dcc755992..ddfa37761 100644 --- a/mod/zfinger.php +++ b/mod/zfinger.php @@ -74,10 +74,15 @@ function zfinger_init(&$a) { */ $r = q("select channel.*, xchan.* from channel left join xchan on channel_hash = xchan_hash - where (( channel_pageflags & %d ) or not ( channel_pageflags & %d )) order by channel_id limit 1", - intval(PAGE_SYSTEM), - intval(PAGE_REMOVED) + where ( channel_pageflags & %d ) order by channel_id limit 1", + intval(PAGE_SYSTEM) ); + if(! $r) { + $r = q("select channel.*, xchan.* from channel left join xchan on channel_hash = xchan_hash + where not ( channel_pageflags & %d ) order by channel_id limit 1", + intval(PAGE_REMOVED) + ); + } } } else { @@ -116,8 +121,8 @@ function zfinger_init(&$a) { $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']); + if(($profile['birthday'] != '0000-00-00') && (($bd = z_birthday($p[0]['dob'],$e['channel_timezone'])) !== '')) + $profile['next_birthday'] = $bd; if($age = age($p[0]['dob'],$e['channel_timezone'],'')) $profile['age'] = $age; |