Merge pull request #1287 from annando/1501-poci-with-location
Poco now shows "about" and the location as well
This commit is contained in:
commit
e03a5ec761
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
function poco_init(&$a) {
|
function poco_init(&$a) {
|
||||||
|
require_once("include/bbcode.php");
|
||||||
|
|
||||||
$system_mode = false;
|
$system_mode = false;
|
||||||
|
|
||||||
|
@ -125,6 +126,8 @@ function poco_init(&$a) {
|
||||||
'updated' => false,
|
'updated' => false,
|
||||||
'preferredUsername' => false,
|
'preferredUsername' => false,
|
||||||
'photos' => false,
|
'photos' => false,
|
||||||
|
'aboutMe' => false,
|
||||||
|
'currentLocation' => false,
|
||||||
'network' => false
|
'network' => false
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -145,6 +148,10 @@ function poco_init(&$a) {
|
||||||
$entry['id'] = $rr['id'];
|
$entry['id'] = $rr['id'];
|
||||||
if($fields_ret['displayName'])
|
if($fields_ret['displayName'])
|
||||||
$entry['displayName'] = $rr['name'];
|
$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']) {
|
if($fields_ret['urls']) {
|
||||||
$entry['urls'] = array(array('value' => $rr['url'], 'type' => 'profile'));
|
$entry['urls'] = array(array('value' => $rr['url'], 'type' => 'profile'));
|
||||||
if($rr['addr'] && ($rr['network'] !== NETWORK_MAIL))
|
if($rr['addr'] && ($rr['network'] !== NETWORK_MAIL))
|
||||||
|
@ -172,6 +179,8 @@ function poco_init(&$a) {
|
||||||
$entry['network'] = $rr['network'];
|
$entry['network'] = $rr['network'];
|
||||||
if ($entry['network'] == NETWORK_STATUSNET)
|
if ($entry['network'] == NETWORK_STATUSNET)
|
||||||
$entry['network'] = NETWORK_OSTATUS;
|
$entry['network'] = NETWORK_OSTATUS;
|
||||||
|
if (($entry['network'] == "") AND ($rr['self']))
|
||||||
|
$entry['network'] = NETWORK_DFRN;
|
||||||
}
|
}
|
||||||
$ret['entry'][] = $entry;
|
$ret['entry'][] = $entry;
|
||||||
}
|
}
|
||||||
|
|
|
@ -468,6 +468,13 @@ function profiles_post(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($is_default) {
|
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
|
// Update global directory in background
|
||||||
$url = $_SESSION['my_url'];
|
$url = $_SESSION['my_url'];
|
||||||
if($url && strlen(get_config('system','directory_submit_url')))
|
if($url && strlen(get_config('system','directory_submit_url')))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user