<?php
function poco_init(&$a) {
+ require_once("include/bbcode.php");
$system_mode = false;
'updated' => false,
'preferredUsername' => false,
'photos' => false,
+ 'aboutMe' => false,
+ 'currentLocation' => false,
'network' => false
);
$entry['id'] = $rr['id'];
if($fields_ret['displayName'])
$entry['displayName'] = $rr['name'];
+ if($fields_ret['aboutMe'])
+ $entry['aboutMe'] = bbcode($rr['about'], false, false);
+ if($fields_ret['currentLocation'])
+ $entry['currentLocation'] = $rr['location'];
if($fields_ret['urls']) {
$entry['urls'] = array(array('value' => $rr['url'], 'type' => 'profile'));
if($rr['addr'] && ($rr['network'] !== NETWORK_MAIL))
$entry['network'] = $rr['network'];
if ($entry['network'] == NETWORK_STATUSNET)
$entry['network'] = NETWORK_OSTATUS;
+ if (($entry['network'] == "") AND ($rr['self']))
+ $entry['network'] = NETWORK_DFRN;
}
$ret['entry'][] = $entry;
}
profile_load($a,$a->user['nickname'],$r[0]['id']);
}
-
-
+
+
}
$dob = '0000-00-00';
$dob = sprintf('%04d-%02d-%02d',$year,$month,$day);
-
+
$name = notags(trim($_POST['name']));
if(! strlen($name)) {
$howlong = '0000-00-00 00:00:00';
else
$howlong = datetime_convert(date_default_timezone_get(),'UTC',$howlong);
-
+
// linkify the relationship target if applicable
$withchanged = false;
$newname = $r[0]['name'];
}
}
-
+
if($prf) {
$with = str_replace($lookup,'<a href="' . $prf . '">' . $newname . '</a>', $with);
if(strpos($with,'@') === 0)
}
if($is_default) {
+
+ $r = q("UPDATE `contact` SET `about` = '%s', `location` = '%s' WHERE `self` = 1 AND `uid` = %d",
+ dbesc($about),
+ dbesc($locality),
+ intval(local_user())
+ );
+
// Update global directory in background
$url = $_SESSION['my_url'];
if($url && strlen(get_config('system','directory_submit_url')))