+ if($fields_ret['network']) {
+ $entry['network'] = $rr['network'];
+ if ($entry['network'] == NETWORK_STATUSNET)
+ $entry['network'] = NETWORK_OSTATUS;
+ if (($entry['network'] == "") AND ($rr['self']))
+ $entry['network'] = NETWORK_DFRN;
+ }
+ if($fields_ret['tags']) {
+ $tags = str_replace(","," ",$rr['keywords']);
+ $tags = explode(" ", $tags);
+
+ $cleaned = array();
+ foreach ($tags as $tag) {
+ $tag = trim(strtolower($tag));
+ if ($tag != "")
+ $cleaned[] = $tag;
+ }
+
+ $entry['tags'] = array($cleaned);
+ }
+ if($fields_ret['address']) {
+ $entry['address'] = array();
+
+ // Deactivated. It just reveals too much data. (Although its from the default profile)
+ //if (isset($rr['paddress']))
+ // $entry['address']['streetAddress'] = $rr['paddress'];
+
+ if (isset($rr['plocation']))
+ $entry['address']['locality'] = $rr['plocation'];
+
+ if (isset($rr['pregion']))
+ $entry['address']['region'] = $rr['pregion'];
+
+ // See above
+ //if (isset($rr['ppostalcode']))
+ // $entry['address']['postalCode'] = $rr['ppostalcode'];
+
+ if (isset($rr['pcountry']))
+ $entry['address']['country'] = $rr['pcountry'];
+ }
+