aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-06-30 00:38:02 -0700
committerfriendica <info@friendica.com>2013-06-30 00:38:02 -0700
commit72f6edd59507797ef4073aed01ca1a0d14fa8cfd (patch)
treeadd1a2879d2a2ca7c7b62ece73517bbf225f2cb9 /include
parent29502438f807275ab8ea8259ca261117e561c962 (diff)
downloadvolse-hubzilla-72f6edd59507797ef4073aed01ca1a0d14fa8cfd.tar.gz
volse-hubzilla-72f6edd59507797ef4073aed01ca1a0d14fa8cfd.tar.bz2
volse-hubzilla-72f6edd59507797ef4073aed01ca1a0d14fa8cfd.zip
add age to directory profile - requires updating on each birthday and that part is still missing
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php1
-rw-r--r--include/poller.php3
-rw-r--r--include/zot.php1
3 files changed, 5 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 0f260c8d2..2169dfe37 100755
--- a/include/items.php
+++ b/include/items.php
@@ -860,6 +860,7 @@ function get_profile_elements($x) {
$arr['desc'] = (($x['title']) ? htmlentities($x['title'],ENT_COMPAT,'UTF-8',false) : '');
$arr['dob'] = datetime_convert('UTC','UTC',$x['birthday'],'Y-m-d');
+ $arr['age'] = (($x['age']) ? intval($x['age']) : 0);
$arr['gender'] = (($x['gender']) ? htmlentities($x['gender'], ENT_COMPAT,'UTF-8',false) : '');
$arr['marital'] = (($x['marital']) ? htmlentities($x['marital'], ENT_COMPAT,'UTF-8',false) : '');
diff --git a/include/poller.php b/include/poller.php
index dff16d3d7..f50bd4e3e 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -63,6 +63,9 @@ function poller_run($argv, $argc){
// once daily run birthday_updates and then expire in background
+ // FIXME: add birthday updates, both locally and for xprof for use
+ // by directory servers
+
$d1 = get_config('system','last_expire_day');
$d2 = intval(datetime_convert('UTC','UTC','now','d'));
diff --git a/include/zot.php b/include/zot.php
index 14a29005d..be0760a05 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1225,6 +1225,7 @@ function import_directory_profile($hash,$profile) {
$arr['xprof_hash'] = $hash;
$arr['xprof_desc'] = (($profile['description']) ? htmlentities($profile['description'], ENT_COMPAT,'UTF-8',false) : '');
$arr['xprof_dob'] = datetime_convert('','',$profile['birthday'],'Y-m-d'); // !!!! check this for 0000 year
+ $arr['xprof_age'] = (($profile['age']) ? intval($profile['age']) : 0);
$arr['xprof_gender'] = (($profile['gender']) ? htmlentities($profile['gender'], ENT_COMPAT,'UTF-8',false) : '');
$arr['xprof_marital'] = (($profile['marital']) ? htmlentities($profile['marital'], ENT_COMPAT,'UTF-8',false) : '');
$arr['xprof_sexual'] = (($profile['sexual']) ? htmlentities($profile['sexual'], ENT_COMPAT,'UTF-8',false) : '');