*/
private static function rearrangeData($data)
{
- $fields = ["name", "nick", "guid", "url", "addr", "alias", "photo",
- "account-type", "community", "keywords", "location", "about",
+ $fields = ["name", "nick", "guid", "url", "addr", "alias", "photo", "account-type",
+ "community", "keywords", "location", "about", "gender", "hide",
"batch", "notify", "poll", "request", "confirm", "poco",
"following", "followers", "inbox", "outbox", "sharedinbox",
"priority", "network", "pubkey", "baseurl"];
if (!empty($ap_profile) && empty($network) && (defaults($data, 'network', '') != Protocol::DFRN)) {
$data = $ap_profile;
} elseif (!empty($ap_profile)) {
+ $ap_profile['batch'] = '';
$data = array_merge($ap_profile, $data);
}
} else {
}
if (!empty($json["tags"])) {
- $keywords = implode(" ", $json["tags"]);
+ $keywords = implode(", ", $json["tags"]);
if ($keywords != "") {
$data["keywords"] = $keywords;
}
$data["about"] = $json["about"];
}
+ if (!empty($json["gender"])) {
+ $data["gender"] = $json["gender"];
+ }
+
if (!empty($json["key"])) {
$data["pubkey"] = $json["key"];
}
$data["poll"] = $json["dfrn-poll"];
}
+ if (isset($json["hide"])) {
+ $data["hide"] = (bool)$json["hide"];
+ } else {
+ $data["hide"] = false;
+ }
+
return $data;
}