mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 04:45:16 +02:00
Global contacts are now added with reshares as well. Better support for "aboutme" and "location" in poco.
This commit is contained in:
parent
6e06169565
commit
344210bd6d
3 changed files with 63 additions and 8 deletions
11
mod/poco.php
11
mod/poco.php
|
@ -83,8 +83,9 @@ function poco_init(&$a) {
|
|||
|
||||
|
||||
if($system_mode) {
|
||||
$r = q("SELECT * FROM `contact` WHERE `self` = 1 AND `network` IN ('%s', '%s', '%s', '%s', '')
|
||||
AND `uid` IN (SELECT `uid` FROM `pconfig` WHERE `cat` = 'system' AND `k` = 'suggestme' AND `v` = 1) LIMIT %d, %d",
|
||||
$r = q("SELECT `contact`.*, `profile`.`about` AS `pabout`, `profile`.`locality` AS `plocation` FROM `contact` INNER JOIN `profile` ON `profile`.`uid` = `contact`.`uid`
|
||||
WHERE `self` = 1 AND `network` IN ('%s', '%s', '%s', '%s', '')
|
||||
AND `contact`.`uid` IN (SELECT `uid` FROM `pconfig` WHERE `cat` = 'system' AND `k` = 'suggestme' AND `v` = 1) LIMIT %d, %d",
|
||||
dbesc(NETWORK_DFRN),
|
||||
dbesc(NETWORK_DIASPORA),
|
||||
dbesc(NETWORK_OSTATUS),
|
||||
|
@ -143,6 +144,12 @@ function poco_init(&$a) {
|
|||
if(is_array($r)) {
|
||||
if(count($r)) {
|
||||
foreach($r as $rr) {
|
||||
if (($rr['about'] == "") AND isset($rr['pabout']))
|
||||
$rr['about'] = $rr['pabout'];
|
||||
|
||||
if (($rr['location'] == "") AND isset($rr['plocation']))
|
||||
$rr['location'] = $rr['plocation'];
|
||||
|
||||
$entry = array();
|
||||
if($fields_ret['id'])
|
||||
$entry['id'] = $rr['id'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue