X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fpoco.php;h=557f401eae7d7daf706191806b1da8f96b24329c;hb=63610c7b73fcaf862adbf880d4968dd2b1678d9b;hp=4b04d70138198851e02346ff7d91a45fa1c75bd9;hpb=0c67c89715df801e0c887be50c9739db3bae7ca3;p=friendica.git diff --git a/mod/poco.php b/mod/poco.php index 4b04d70138..557f401eae 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -1,6 +1,7 @@ false, 'tags' => false, 'address' => false, + 'contactType' => false, 'generation' => false ); @@ -169,7 +173,7 @@ function poco_init(&$a) { } if(is_array($r)) { - if(count($r)) { + if(dbm::is_result($r)) { foreach($r as $rr) { if (!isset($rr['generation'])) { if ($global) @@ -208,6 +212,9 @@ function poco_init(&$a) { if (($rr['keywords'] == "") AND isset($rr['pub_keywords'])) $rr['keywords'] = $rr['pub_keywords']; + if (isset($rr['account-type'])) + $rr['contact-type'] = $rr['account-type']; + $about = Cache::get("about:".$rr['updated'].":".$rr['nurl']); if (is_null($about)) { $about = bbcode($rr['about'], false, false); @@ -301,6 +308,9 @@ function poco_init(&$a) { $entry['address']['country'] = $rr['pcountry']; } + if($fields_ret['contactType']) + $entry['contactType'] = intval($rr['contact-type']); + $ret['entry'][] = $entry; } } @@ -325,5 +335,5 @@ function poco_init(&$a) { else http_status_exit(500); -} + }