mirror of
https://github.com/friendica/friendica
synced 2024-12-24 12:40:16 +00:00
commit
fc9865176e
24 changed files with 35 additions and 131 deletions
10
mod/poco.php
10
mod/poco.php
|
@ -152,7 +152,7 @@ function poco_init(App $a) {
|
|||
} elseif ($system_mode) {
|
||||
Logger::log("Start system mode query", Logger::DEBUG);
|
||||
$contacts = q("SELECT `contact`.*, `profile`.`about` AS `pabout`, `profile`.`locality` AS `plocation`, `profile`.`pub_keywords`,
|
||||
`profile`.`gender` AS `pgender`, `profile`.`address` AS `paddress`, `profile`.`region` AS `pregion`,
|
||||
`profile`.`address` AS `paddress`, `profile`.`region` AS `pregion`,
|
||||
`profile`.`postal-code` AS `ppostalcode`, `profile`.`country-name` AS `pcountry`, `user`.`account-type`
|
||||
FROM `contact` INNER JOIN `profile` ON `profile`.`uid` = `contact`.`uid`
|
||||
INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
|
||||
|
@ -203,7 +203,6 @@ function poco_init(App $a) {
|
|||
'aboutMe' => false,
|
||||
'currentLocation' => false,
|
||||
'network' => false,
|
||||
'gender' => false,
|
||||
'tags' => false,
|
||||
'address' => false,
|
||||
'contactType' => false,
|
||||
|
@ -260,9 +259,6 @@ function poco_init(App $a) {
|
|||
}
|
||||
}
|
||||
|
||||
if (($contact['gender'] == "") && isset($contact['pgender'])) {
|
||||
$contact['gender'] = $contact['pgender'];
|
||||
}
|
||||
if (($contact['keywords'] == "") && isset($contact['pub_keywords'])) {
|
||||
$contact['keywords'] = $contact['pub_keywords'];
|
||||
}
|
||||
|
@ -279,7 +275,6 @@ function poco_init(App $a) {
|
|||
if ($contact['network'] == Protocol::DIASPORA) {
|
||||
$contact['location'] = "";
|
||||
$about = "";
|
||||
$contact['gender'] = "";
|
||||
}
|
||||
|
||||
$entry = [];
|
||||
|
@ -295,9 +290,6 @@ function poco_init(App $a) {
|
|||
if ($fields_ret['currentLocation']) {
|
||||
$entry['currentLocation'] = $contact['location'];
|
||||
}
|
||||
if ($fields_ret['gender']) {
|
||||
$entry['gender'] = $contact['gender'];
|
||||
}
|
||||
if ($fields_ret['generation']) {
|
||||
$entry['generation'] = (int)$contact['generation'];
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ class Introduction extends BaseFactory
|
|||
`fcontact`.`name` AS `fname`, `fcontact`.`url` AS `furl`, `fcontact`.`addr` AS `faddr`,
|
||||
`fcontact`.`photo` AS `fphoto`, `fcontact`.`request` AS `frequest`,
|
||||
`gcontact`.`location` AS `glocation`, `gcontact`.`about` AS `gabout`,
|
||||
`gcontact`.`keywords` AS `gkeywords`, `gcontact`.`gender` AS `ggender`,
|
||||
`gcontact`.`keywords` AS `gkeywords`,
|
||||
`gcontact`.`network` AS `gnetwork`, `gcontact`.`addr` AS `gaddr`
|
||||
FROM `intro`
|
||||
LEFT JOIN `contact` ON `contact`.`id` = `intro`.`contact-id`
|
||||
|
@ -157,7 +157,6 @@ class Introduction extends BaseFactory
|
|||
if ($notification['gnetwork'] === Protocol::DIASPORA) {
|
||||
$notification['glocation'] = "";
|
||||
$notification['gabout'] = "";
|
||||
$notification['ggender'] = "";
|
||||
}
|
||||
|
||||
$formattedNotifications[] = new Notification\Introduction([
|
||||
|
@ -172,7 +171,6 @@ class Introduction extends BaseFactory
|
|||
'location' => BBCode::convert($notification['glocation'], false),
|
||||
'about' => BBCode::convert($notification['gabout'], false),
|
||||
'keywords' => $notification['gkeywords'],
|
||||
'gender' => $notification['ggender'],
|
||||
'hidden' => $notification['hidden'] == 1,
|
||||
'post_newfriend' => (intval($this->pConfig->get(local_user(), 'system', 'post_newfriend')) ? '1' : 0),
|
||||
'url' => $notification['url'],
|
||||
|
|
|
@ -725,7 +725,7 @@ class Contact
|
|||
*/
|
||||
public static function updateSelfFromUserID($uid, $update_avatar = false)
|
||||
{
|
||||
$fields = ['id', 'name', 'nick', 'location', 'about', 'keywords', 'gender', 'avatar',
|
||||
$fields = ['id', 'name', 'nick', 'location', 'about', 'keywords', 'avatar',
|
||||
'xmpp', 'contact-type', 'forum', 'prv', 'avatar-date', 'url', 'nurl', 'unsearchable',
|
||||
'photo', 'thumb', 'micro', 'addr', 'request', 'notify', 'poll', 'confirm', 'poco'];
|
||||
$self = DBA::selectFirst('contact', $fields, ['uid' => $uid, 'self' => true]);
|
||||
|
@ -751,7 +751,7 @@ class Contact
|
|||
$fields = ['name' => $profile['name'], 'nick' => $user['nickname'],
|
||||
'avatar-date' => $self['avatar-date'], 'location' => Profile::formatLocation($profile),
|
||||
'about' => $profile['about'], 'keywords' => $profile['pub_keywords'],
|
||||
'gender' => '', 'contact-type' => $user['account-type'],
|
||||
'contact-type' => $user['account-type'],
|
||||
'xmpp' => $profile['xmpp']];
|
||||
|
||||
$avatar = Photo::selectFirst(['resource-id', 'type'], ['uid' => $uid, 'profile' => true]);
|
||||
|
@ -1029,14 +1029,14 @@ class Contact
|
|||
|
||||
// Fetch contact data from the contact table for the given user
|
||||
$s = DBA::p("SELECT `id`, `id` AS `cid`, 0 AS `gid`, 0 AS `zid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`,
|
||||
`keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self`, `rel`, `pending`
|
||||
`keywords`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self`, `rel`, `pending`
|
||||
FROM `contact` WHERE `nurl` = ? AND `uid` = ?", $nurl, $uid);
|
||||
$r = DBA::toArray($s);
|
||||
|
||||
// Fetch contact data from the contact table for the given user, checking with the alias
|
||||
if (!DBA::isResult($r)) {
|
||||
$s = DBA::p("SELECT `id`, `id` AS `cid`, 0 AS `gid`, 0 AS `zid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`,
|
||||
`keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self`, `rel`, `pending`
|
||||
`keywords`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self`, `rel`, `pending`
|
||||
FROM `contact` WHERE `alias` IN (?, ?, ?) AND `uid` = ?", $nurl, $url, $ssl_url, $uid);
|
||||
$r = DBA::toArray($s);
|
||||
}
|
||||
|
@ -1044,7 +1044,7 @@ class Contact
|
|||
// Fetch the data from the contact table with "uid=0" (which is filled automatically)
|
||||
if (!DBA::isResult($r)) {
|
||||
$s = DBA::p("SELECT `id`, 0 AS `cid`, `id` AS `zid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`,
|
||||
`keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self`, `rel`, `pending`
|
||||
`keywords`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self`, `rel`, `pending`
|
||||
FROM `contact` WHERE `nurl` = ? AND `uid` = 0", $nurl);
|
||||
$r = DBA::toArray($s);
|
||||
}
|
||||
|
@ -1052,7 +1052,7 @@ class Contact
|
|||
// Fetch the data from the contact table with "uid=0" (which is filled automatically) - checked with the alias
|
||||
if (!DBA::isResult($r)) {
|
||||
$s = DBA::p("SELECT `id`, 0 AS `cid`, `id` AS `zid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`,
|
||||
`keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self`, `rel`, `pending`
|
||||
`keywords`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self`, `rel`, `pending`
|
||||
FROM `contact` WHERE `alias` IN (?, ?, ?) AND `uid` = 0", $nurl, $url, $ssl_url);
|
||||
$r = DBA::toArray($s);
|
||||
}
|
||||
|
@ -1060,7 +1060,7 @@ class Contact
|
|||
// Fetch the data from the gcontact table
|
||||
if (!DBA::isResult($r)) {
|
||||
$s = DBA::p("SELECT 0 AS `id`, 0 AS `cid`, `id` AS `gid`, 0 AS `zid`, 0 AS `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, '' AS `xmpp`,
|
||||
`keywords`, `gender`, `photo`, `photo` AS `thumb`, `photo` AS `micro`, 0 AS `forum`, 0 AS `prv`, `community`, `contact-type`, `birthday`, 0 AS `self`, 2 AS `rel`, 0 AS `pending`
|
||||
`keywords`, `photo`, `photo` AS `thumb`, `photo` AS `micro`, 0 AS `forum`, 0 AS `prv`, `community`, `contact-type`, `birthday`, 0 AS `self`, 2 AS `rel`, 0 AS `pending`
|
||||
FROM `gcontact` WHERE `nurl` = ?", $nurl);
|
||||
$r = DBA::toArray($s);
|
||||
}
|
||||
|
@ -1132,7 +1132,6 @@ class Contact
|
|||
if (empty($profile["cid"]) && ($profile["network"] ?? "") == Protocol::DIASPORA) {
|
||||
$profile["location"] = "";
|
||||
$profile["about"] = "";
|
||||
$profile["gender"] = "";
|
||||
$profile["birthday"] = DBA::NULL_DATE;
|
||||
}
|
||||
|
||||
|
@ -1165,7 +1164,7 @@ class Contact
|
|||
|
||||
// Fetch contact data from the contact table for the given user
|
||||
$r = q("SELECT `id`, `id` AS `cid`, 0 AS `gid`, 0 AS `zid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`,
|
||||
`keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self`, `rel`, `pending`
|
||||
`keywords`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self`, `rel`, `pending`
|
||||
FROM `contact` WHERE `addr` = '%s' AND `uid` = %d AND NOT `deleted`",
|
||||
DBA::escape($addr),
|
||||
intval($uid)
|
||||
|
@ -1173,7 +1172,7 @@ class Contact
|
|||
// Fetch the data from the contact table with "uid=0" (which is filled automatically)
|
||||
if (!DBA::isResult($r)) {
|
||||
$r = q("SELECT `id`, 0 AS `cid`, `id` AS `zid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`,
|
||||
`keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self`, `rel`, `pending`
|
||||
`keywords`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self`, `rel`, `pending`
|
||||
FROM `contact` WHERE `addr` = '%s' AND `uid` = 0 AND NOT `deleted`",
|
||||
DBA::escape($addr)
|
||||
);
|
||||
|
@ -1182,7 +1181,7 @@ class Contact
|
|||
// Fetch the data from the gcontact table
|
||||
if (!DBA::isResult($r)) {
|
||||
$r = q("SELECT 0 AS `id`, 0 AS `cid`, `id` AS `gid`, 0 AS `zid`, 0 AS `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, '' AS `xmpp`,
|
||||
`keywords`, `gender`, `photo`, `photo` AS `thumb`, `photo` AS `micro`, `community` AS `forum`, 0 AS `prv`, `community`, `contact-type`, `birthday`, 0 AS `self`, 2 AS `rel`, 0 AS `pending`
|
||||
`keywords`, `photo`, `photo` AS `thumb`, `photo` AS `micro`, `community` AS `forum`, 0 AS `prv`, `community`, `contact-type`, `birthday`, 0 AS `self`, 2 AS `rel`, 0 AS `pending`
|
||||
FROM `gcontact` WHERE `addr` = '%s'",
|
||||
DBA::escape($addr)
|
||||
);
|
||||
|
@ -2086,7 +2085,7 @@ class Contact
|
|||
// These fields aren't updated by this routine:
|
||||
// 'xmpp', 'sensitive'
|
||||
|
||||
$fields = ['uid', 'avatar', 'name', 'nick', 'location', 'keywords', 'about', 'gender',
|
||||
$fields = ['uid', 'avatar', 'name', 'nick', 'location', 'keywords', 'about',
|
||||
'unsearchable', 'url', 'addr', 'batch', 'notify', 'poll', 'request', 'confirm', 'poco',
|
||||
'network', 'alias', 'baseurl', 'forum', 'prv', 'contact-type', 'pubkey'];
|
||||
$contact = DBA::selectFirst('contact', $fields, ['id' => $id]);
|
||||
|
|
|
@ -674,7 +674,7 @@ class GContact
|
|||
}
|
||||
|
||||
$public_contact = DBA::selectFirst('gcontact', [
|
||||
'name', 'nick', 'photo', 'location', 'about', 'addr', 'generation', 'birthday', 'gender', 'keywords',
|
||||
'name', 'nick', 'photo', 'location', 'about', 'addr', 'generation', 'birthday', 'keywords',
|
||||
'contact-type', 'hide', 'nsfw', 'network', 'alias', 'notify', 'server_url', 'connect', 'updated', 'url'
|
||||
], ['id' => $gcontact_id]);
|
||||
|
||||
|
@ -769,7 +769,7 @@ class GContact
|
|||
'photo' => $contact['photo'], 'name' => $contact['name'],
|
||||
'nick' => $contact['nick'], 'addr' => $contact['addr'],
|
||||
'network' => $contact['network'], 'birthday' => $contact['birthday'],
|
||||
'gender' => $contact['gender'], 'keywords' => $contact['keywords'],
|
||||
'keywords' => $contact['keywords'],
|
||||
'hide' => $contact['hide'], 'nsfw' => $contact['nsfw'],
|
||||
'contact-type' => $contact['contact-type'], 'alias' => $contact['alias'],
|
||||
'notify' => $contact['notify'], 'url' => $contact['url'],
|
||||
|
@ -997,7 +997,7 @@ class GContact
|
|||
*/
|
||||
private static function updateFromPublicContact($condition)
|
||||
{
|
||||
$fields = ['name', 'nick', 'url', 'nurl', 'location', 'about', 'keywords', 'gender',
|
||||
$fields = ['name', 'nick', 'url', 'nurl', 'location', 'about', 'keywords',
|
||||
'bd', 'contact-type', 'network', 'addr', 'notify', 'alias', 'archive', 'term-date',
|
||||
'created', 'updated', 'avatar', 'success_update', 'failure_update', 'forum', 'prv',
|
||||
'baseurl', 'sensitive', 'unsearchable'];
|
||||
|
@ -1007,7 +1007,7 @@ class GContact
|
|||
return 0;
|
||||
}
|
||||
|
||||
$fields = ['name', 'nick', 'url', 'nurl', 'location', 'about', 'keywords', 'gender', 'generation',
|
||||
$fields = ['name', 'nick', 'url', 'nurl', 'location', 'about', 'keywords', 'generation',
|
||||
'birthday', 'contact-type', 'network', 'addr', 'notify', 'alias', 'archived', 'archive_date',
|
||||
'created', 'updated', 'photo', 'last_contact', 'last_failure', 'community', 'connect',
|
||||
'server_url', 'nsfw', 'hide', 'id'];
|
||||
|
@ -1021,7 +1021,7 @@ class GContact
|
|||
$gcontact = [];
|
||||
|
||||
// These fields are identical in both contact and gcontact
|
||||
$fields = ['name', 'nick', 'url', 'nurl', 'location', 'about', 'keywords', 'gender',
|
||||
$fields = ['name', 'nick', 'url', 'nurl', 'location', 'about', 'keywords',
|
||||
'contact-type', 'network', 'addr', 'notify', 'alias', 'created', 'updated'];
|
||||
|
||||
foreach ($fields as $field) {
|
||||
|
@ -1133,7 +1133,7 @@ class GContact
|
|||
);
|
||||
|
||||
$gcontact = ['name' => $userdata['name'], 'location' => $location, 'about' => $userdata['about'],
|
||||
'gender' => '', 'keywords' => $userdata['pub_keywords'],
|
||||
'keywords' => $userdata['pub_keywords'],
|
||||
'birthday' => $userdata['dob'], 'photo' => $userdata['photo'],
|
||||
"notify" => $userdata['notify'], 'url' => $userdata['url'],
|
||||
"hide" => ($userdata['hidewall'] || !$userdata['net-publish']),
|
||||
|
|
|
@ -376,13 +376,12 @@ class Profile
|
|||
$location = DI::l10n()->t('Location:');
|
||||
}
|
||||
|
||||
$gender = !empty($profile['gender']) ? DI::l10n()->t('Gender:') : false;
|
||||
$homepage = !empty($profile['homepage']) ? DI::l10n()->t('Homepage:') : false;
|
||||
$about = !empty($profile['about']) ? DI::l10n()->t('About:') : false;
|
||||
$xmpp = !empty($profile['xmpp']) ? DI::l10n()->t('XMPP:') : false;
|
||||
|
||||
if ((!empty($profile['hidewall']) || $block) && !Session::isAuthenticated()) {
|
||||
$location = $gender = $marital = $homepage = $about = false;
|
||||
$location = $homepage = $about = false;
|
||||
}
|
||||
|
||||
$split_name = Diaspora::splitName($profile['name']);
|
||||
|
@ -451,10 +450,6 @@ class Profile
|
|||
$p['address'] = BBCode::convert($p['address']);
|
||||
}
|
||||
|
||||
if (isset($p['gender'])) {
|
||||
$p['gender'] = DI::l10n()->t($p['gender']);
|
||||
}
|
||||
|
||||
if (isset($p['photo'])) {
|
||||
$p['photo'] = ProxyUtils::proxifyUrl($p['photo'], false, ProxyUtils::SIZE_SMALL);
|
||||
}
|
||||
|
@ -475,7 +470,6 @@ class Profile
|
|||
'$wallmessage_link' => $wallmessage_link,
|
||||
'$account_type' => $account_type,
|
||||
'$location' => $location,
|
||||
'$gender' => $gender,
|
||||
'$homepage' => $homepage,
|
||||
'$about' => $about,
|
||||
'$network' => DI::l10n()->t('Network:'),
|
||||
|
|
|
@ -107,7 +107,6 @@ class Hovercard extends BaseModule
|
|||
'url' => Contact::magicLink($contact['url']),
|
||||
'nurl' => $contact['nurl'],
|
||||
'location' => $contact['location'],
|
||||
'gender' => $contact['gender'],
|
||||
'about' => $contact['about'],
|
||||
'network_link' => Strings::formatNetworkName($contact['network'], $contact['url']),
|
||||
'tags' => $contact['keywords'],
|
||||
|
|
|
@ -168,8 +168,6 @@ class Introductions extends BaseNotifications
|
|||
'$lbl_about' => DI::l10n()->t('About:'),
|
||||
'$keywords' => $notification->getKeywords(),
|
||||
'$lbl_keywords' => DI::l10n()->t('Tags:'),
|
||||
'$gender' => $notification->getGender(),
|
||||
'$lbl_gender' => DI::l10n()->t('Gender:'),
|
||||
'$hidden' => ['hidden', DI::l10n()->t('Hide this contact from others'), $notification->isHidden(), ''],
|
||||
'$lbl_connection_type' => $helptext,
|
||||
'$friend' => $friend,
|
||||
|
|
|
@ -57,7 +57,7 @@ class Probe
|
|||
private static function rearrangeData($data)
|
||||
{
|
||||
$fields = ["name", "nick", "guid", "url", "addr", "alias", "photo", "account-type",
|
||||
"community", "keywords", "location", "about", "gender", "hide",
|
||||
"community", "keywords", "location", "about", "hide",
|
||||
"batch", "notify", "poll", "request", "confirm", "poco",
|
||||
"following", "followers", "inbox", "outbox", "sharedinbox",
|
||||
"priority", "network", "pubkey", "baseurl"];
|
||||
|
@ -849,9 +849,6 @@ class Probe
|
|||
if (!empty($profile['description'])) {
|
||||
$data['about'] = $profile['description'];
|
||||
}
|
||||
if (!empty($profile['gender'])) {
|
||||
$data['gender'] = $profile['gender'];
|
||||
}
|
||||
if (!empty($profile['keywords'])) {
|
||||
$keywords = implode(', ', $profile['keywords']);
|
||||
if (!empty($keywords)) {
|
||||
|
@ -1012,10 +1009,6 @@ class Probe
|
|||
$data["about"] = $json["about"];
|
||||
}
|
||||
|
||||
if (!empty($json["gender"])) {
|
||||
$data["gender"] = $json["gender"];
|
||||
}
|
||||
|
||||
if (!empty($json["key"])) {
|
||||
$data["pubkey"] = $json["key"];
|
||||
}
|
||||
|
|
|
@ -71,8 +71,6 @@ class Introduction implements \JsonSerializable
|
|||
/** @var string */
|
||||
private $keywords = '';
|
||||
/** @var string */
|
||||
private $gender = '';
|
||||
/** @var string */
|
||||
private $location = '';
|
||||
/** @var string */
|
||||
private $about = '';
|
||||
|
@ -253,14 +251,6 @@ class Introduction implements \JsonSerializable
|
|||
return $this->keywords;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getGender()
|
||||
{
|
||||
return $this->gender;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
@ -301,7 +291,6 @@ class Introduction implements \JsonSerializable
|
|||
$this->network = $data['network'] ?? '';
|
||||
$this->uid = $data['uid'] ?? -1;
|
||||
$this->keywords = $data['keywords'] ?? '';
|
||||
$this->gender = $data['gender'] ?? '';
|
||||
$this->location = $data['location'] ?? '';
|
||||
$this->about = $data['about'] ?? '';
|
||||
}
|
||||
|
|
|
@ -2299,7 +2299,6 @@ class Diaspora
|
|||
$name = XML::unescape($data->first_name).((strlen($data->last_name)) ? " ".XML::unescape($data->last_name) : "");
|
||||
$image_url = XML::unescape($data->image_url);
|
||||
$birthday = XML::unescape($data->birthday);
|
||||
$gender = XML::unescape($data->gender);
|
||||
$about = Markdown::toBBCode(XML::unescape($data->bio));
|
||||
$location = Markdown::toBBCode(XML::unescape($data->location));
|
||||
$searchable = (XML::unescape($data->searchable) == "true");
|
||||
|
@ -2347,8 +2346,7 @@ class Diaspora
|
|||
}
|
||||
|
||||
$fields = ['name' => $name, 'location' => $location,
|
||||
'name-date' => DateTimeFormat::utcNow(),
|
||||
'about' => $about, 'gender' => $gender,
|
||||
'name-date' => DateTimeFormat::utcNow(), 'about' => $about,
|
||||
'addr' => $author, 'nick' => $nick, 'keywords' => $keywords,
|
||||
'unsearchable' => !$searchable, 'sensitive' => $nsfw];
|
||||
|
||||
|
@ -2362,7 +2360,7 @@ class Diaspora
|
|||
|
||||
$gcontact = ["url" => $contact["url"], "network" => Protocol::DIASPORA, "generation" => 2,
|
||||
"photo" => $image_url, "name" => $name, "location" => $location,
|
||||
"about" => $about, "birthday" => $birthday, "gender" => $gender,
|
||||
"about" => $about, "birthday" => $birthday,
|
||||
"addr" => $author, "nick" => $nick, "keywords" => $keywords,
|
||||
"hide" => !$searchable, "nsfw" => $nsfw];
|
||||
|
||||
|
@ -4164,7 +4162,6 @@ class Diaspora
|
|||
"image_url_medium" => $medium,
|
||||
"image_url_small" => $small,
|
||||
"birthday" => $dob,
|
||||
"gender" => $profile['gender'],
|
||||
"bio" => $about,
|
||||
"location" => $location,
|
||||
"searchable" => $searchable,
|
||||
|
|
|
@ -99,7 +99,7 @@ class PortableContact
|
|||
return;
|
||||
}
|
||||
|
||||
$url = $url . (($uid) ? '/@me/@all?fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,gender,contactType,generation' : '?fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,gender,contactType,generation');
|
||||
$url = $url . (($uid) ? '/@me/@all?fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,contactType,generation' : '?fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,contactType,generation');
|
||||
|
||||
Logger::log('load: ' . $url, Logger::DEBUG);
|
||||
|
||||
|
@ -134,7 +134,6 @@ class PortableContact
|
|||
$location = '';
|
||||
$about = '';
|
||||
$keywords = '';
|
||||
$gender = '';
|
||||
$contact_type = -1;
|
||||
$generation = 0;
|
||||
|
||||
|
@ -179,10 +178,6 @@ class PortableContact
|
|||
$about = HTML::toBBCode($entry['aboutMe']);
|
||||
}
|
||||
|
||||
if (isset($entry['gender'])) {
|
||||
$gender = $entry['gender'];
|
||||
}
|
||||
|
||||
if (isset($entry['generation']) && ($entry['generation'] > 0)) {
|
||||
$generation = ++$entry['generation'];
|
||||
}
|
||||
|
@ -203,7 +198,6 @@ class PortableContact
|
|||
"photo" => $profile_photo,
|
||||
"about" => $about,
|
||||
"location" => $location,
|
||||
"gender" => $gender,
|
||||
"keywords" => $keywords,
|
||||
"connect" => $connect_url,
|
||||
"updated" => $updated,
|
||||
|
@ -293,7 +287,7 @@ class PortableContact
|
|||
self::fetchServerlist($server["poco"]);
|
||||
|
||||
// Fetch all users from the other server
|
||||
$url = $server["poco"] . "/?fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,gender,contactType,generation";
|
||||
$url = $server["poco"] . "/?fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,contactType,generation";
|
||||
|
||||
Logger::info("Fetch all users from the server " . $server["url"]);
|
||||
|
||||
|
@ -316,7 +310,7 @@ class PortableContact
|
|||
$updatedSince = date(DateTimeFormat::MYSQL, time() - $timeframe * 86400);
|
||||
|
||||
// Fetch all global contacts from the other server (Not working with Redmatrix and Friendica versions before 3.3)
|
||||
$url = $server["poco"]."/@global?updatedSince=".$updatedSince."&fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,gender,contactType,generation";
|
||||
$url = $server["poco"]."/@global?updatedSince=".$updatedSince."&fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,contactType,generation";
|
||||
|
||||
$success = false;
|
||||
|
||||
|
@ -376,7 +370,7 @@ class PortableContact
|
|||
Logger::log('Fetch contacts for the user ' . $username . ' from the server ' . $server['nurl'], Logger::DEBUG);
|
||||
|
||||
// Fetch all contacts from a given user from the other server
|
||||
$url = $server['poco'] . '/' . $username . '/?fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,gender,contactType,generation';
|
||||
$url = $server['poco'] . '/' . $username . '/?fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,contactType,generation';
|
||||
|
||||
$curlResult = Network::curl($url);
|
||||
|
||||
|
@ -409,7 +403,6 @@ class PortableContact
|
|||
$location = '';
|
||||
$about = '';
|
||||
$keywords = '';
|
||||
$gender = '';
|
||||
$contact_type = -1;
|
||||
$generation = $default_generation;
|
||||
|
||||
|
@ -455,10 +448,6 @@ class PortableContact
|
|||
$about = HTML::toBBCode($entry['aboutMe']);
|
||||
}
|
||||
|
||||
if (isset($entry['gender'])) {
|
||||
$gender = $entry['gender'];
|
||||
}
|
||||
|
||||
if (isset($entry['generation']) && ($entry['generation'] > 0)) {
|
||||
$generation = ++$entry['generation'];
|
||||
}
|
||||
|
@ -484,7 +473,6 @@ class PortableContact
|
|||
"photo" => $profile_photo,
|
||||
"about" => $about,
|
||||
"location" => $location,
|
||||
"gender" => $gender,
|
||||
"keywords" => $keywords,
|
||||
"connect" => $connect_url,
|
||||
"updated" => $updated,
|
||||
|
|
|
@ -273,7 +273,6 @@ class ProfileField extends BaseRepository
|
|||
|
||||
$custom_fields = [
|
||||
'hometown' => $this->l10n->t('Hometown:'),
|
||||
'gender' => $this->l10n->t('Gender:'),
|
||||
'marital' => $this->l10n->t('Marital Status:'),
|
||||
'with' => $this->l10n->t('With:'),
|
||||
'howlong' => $this->l10n->t('Since:'),
|
||||
|
|
|
@ -240,7 +240,7 @@ return [
|
|||
"location" => ["type" => "varchar(255)", "default" => "", "comment" => ""],
|
||||
"about" => ["type" => "text", "comment" => ""],
|
||||
"keywords" => ["type" => "text", "comment" => "public keywords (interests) of the contact"],
|
||||
"gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
|
||||
"gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
|
||||
"xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
|
||||
"attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
|
||||
"avatar" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
|
||||
|
@ -466,7 +466,7 @@ return [
|
|||
"location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
|
||||
"about" => ["type" => "text", "comment" => ""],
|
||||
"keywords" => ["type" => "text", "comment" => "puplic keywords (interests)"],
|
||||
"gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
|
||||
"gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
|
||||
"birthday" => ["type" => "varchar(32)", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""],
|
||||
"community" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if contact is forum account"],
|
||||
"contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "-1", "comment" => ""],
|
||||
|
|
29
update.php
29
update.php
|
@ -54,29 +54,6 @@ use Friendica\Model\Storage;
|
|||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Worker\Delivery;
|
||||
|
||||
function update_1178()
|
||||
{
|
||||
require_once 'mod/profiles.php';
|
||||
|
||||
$profiles = q("SELECT `uid`, `about`, `locality`, `pub_keywords`, `gender` FROM `profile` WHERE `is-default`");
|
||||
|
||||
foreach ($profiles as $profile) {
|
||||
if ($profile["about"].$profile["locality"].$profile["pub_keywords"].$profile["gender"] == "") {
|
||||
continue;
|
||||
}
|
||||
|
||||
$profile["pub_keywords"] = profile_clean_keywords($profile["pub_keywords"]);
|
||||
|
||||
$r = q("UPDATE `contact` SET `about` = '%s', `location` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `self` AND `uid` = %d",
|
||||
DBA::escape($profile["about"]),
|
||||
DBA::escape($profile["locality"]),
|
||||
DBA::escape($profile["pub_keywords"]),
|
||||
DBA::escape($profile["gender"]),
|
||||
intval($profile["uid"])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function update_1179()
|
||||
{
|
||||
if (DI::config()->get('system', 'no_community_page')) {
|
||||
|
@ -153,7 +130,7 @@ function update_1191()
|
|||
|
||||
if ($key === 'show_on_profile') {
|
||||
if ($value) {
|
||||
DI::pConfig()->set($uid, feature, forumlist_profile, $value);
|
||||
DI::pConfig()->set($uid, 'feature', 'forumlist_profile', $value);
|
||||
}
|
||||
|
||||
DI::pConfig()->delete($uid, $family, $key);
|
||||
|
@ -161,7 +138,7 @@ function update_1191()
|
|||
|
||||
if ($key === 'show_on_network') {
|
||||
if ($value) {
|
||||
DI::pConfig()->set($uid, feature, forumlist_widget, $value);
|
||||
DI::pConfig()->set($uid, 'feature', 'forumlist_widget', $value);
|
||||
}
|
||||
|
||||
DI::pConfig()->delete($uid, $family, $key);
|
||||
|
@ -379,7 +356,7 @@ function update_1309()
|
|||
|
||||
$deliver_options = ['priority' => PRIORITY_MEDIUM, 'dont_fork' => true];
|
||||
Worker::add($deliver_options, 'Delivery', Delivery::POST, $item['id'], $entry['cid']);
|
||||
Logger::info('Added delivery worker', ['command' => $cmd, 'item' => $item['id'], 'contact' => $entry['cid']]);
|
||||
Logger::info('Added delivery worker', ['item' => $item['id'], 'contact' => $entry['cid']]);
|
||||
DBA::delete('queue', ['id' => $entry['id']]);
|
||||
}
|
||||
return Update::SUCCESS;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
<img id="photo-{{$contact_id}}" class="intro-photo" src="{{$photo}}" width="175" height=175" title="{{$fullname}}" alt="{{$fullname}}" />
|
||||
<dl><dt>{{$lbl_url}}</dt><dd><a target="blank" href="{{$zrl}}">{{$url}}</a></dd></dl>
|
||||
{{if $location}}<dl><dt>{{$lbl_location}}</dt><dd>{{$location}}</dd></dl>{{/if}}
|
||||
{{if $gender}}<dl><dt>{{$lbl_gender}}</dt><dd>{{$gender}}</dd></dl>{{/if}}
|
||||
{{if $keywords}}<dl><dt>{{$lbl_keywords}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
|
||||
{{if $about}}<dl><dt>{{$lbl_about}}</dt><dd>{{$about nofilter}}</dd></dl>{{/if}}
|
||||
<div class="intro-knowyou">{{$lbl_knowyou}} {{$knowyou}}</div>
|
||||
|
|
|
@ -35,8 +35,6 @@
|
|||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $gender}}<dl class="mf"><dt class="gender-label">{{$gender}}</dt> <dd class="p-gender">{{$profile.gender}}</dd></dl>{{/if}}
|
||||
|
||||
{{if $profile.pubkey}}<div class="key u-key" style="display:none;">{{$profile.pubkey}}</div>{{/if}}
|
||||
|
||||
{{if $contacts}}<div class="contacts" style="display:none;">{{$contacts}}</div>{{/if}}
|
||||
|
|
|
@ -2317,7 +2317,7 @@ aside input[type='text'] {
|
|||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.location-label, .gender-label, .homepage-label, .network-label {
|
||||
.location-label, .homepage-label, .network-label {
|
||||
float: left;
|
||||
text-align: right;
|
||||
display: block;
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $gender}}<dl class="mf"><dt class="gender-label">{{$gender}}</dt> <dd class="p-gender">{{$profile.gender}}</dd></dl>{{/if}}
|
||||
|
||||
{{if $profile.pubkey}}<div class="key" style="display:none;">{{$profile.pubkey}}</div>{{/if}}
|
||||
|
||||
{{if $homepage}}<dl class="homepage"><dt class="homepage-label">{{$homepage}}</dt><dd class="homepage-url"><a href="{{$profile.homepage}}" class="u-url" rel="me" target="external-link">{{$profile.homepage}}</a></dd></dl>{{/if}}
|
||||
|
|
|
@ -2966,12 +2966,12 @@ ul.notif-network-list > li:hover .intro-action-buttons {
|
|||
transition: max-height 0.1s ease-in;
|
||||
}
|
||||
.intro-desc-label, .intro-url-label, .intro-network-label,
|
||||
.intro-location-label, .intro-gender-label, .intro-keywords-label,
|
||||
.intro-location-label, .intro-keywords-label,
|
||||
.intro-about-label, .intro-knowyou-label, .intro-madeby-label {
|
||||
font-weight: bold;
|
||||
}
|
||||
.intro-contact-info.xs .intro-url-label, .intro-contact-info.xs .intro-network-label,
|
||||
.intro-contact-info.xs .intro-location-label, .intro-contact-info.xs .intro-gender-label,
|
||||
.intro-contact-info.xs .intro-location-label,
|
||||
.intro-contact-info.xs .intro-keywords-label, .intro-contact-info.xs .intro-about-label,
|
||||
.intro-contact-info.xs .intro-knowyou-label {
|
||||
display: block;
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
<div class="intro-url"><span class="intro-url-label">{{$lbl_url}}: </span><a href="{{$zrl}}">{{$url}}</a></div>
|
||||
{{if $network}}<div class="intro-network"><span class="intro-network-label">{{$lbl_network}}</span> {{$network}}</div>{{/if}}
|
||||
{{if $location}}<div class="intro-location"><span class="intro-location-label">{{$lbl_location}}</span> {{$location}}</div>{{/if}}
|
||||
{{if $gender}}<div class="intro-gender"><span class="intro-gender-label">{{$lbl_gender}}</span> {{$gender}}</div>{{/if}}
|
||||
{{if $keywords}}<div class="intro-keywords"><span class="intro-keywords-label">{{$lbl_keywords}}</span> {{$keywords}}</div>{{/if}}
|
||||
{{if $about}}<div class="intro-about"><span class="intro-about-label">{{$lbl_about}}</span> {{$about nofilter}}</div>{{/if}}
|
||||
<div class="intro-knowyou"><span class="intro-knowyou-label">{{$lbl_knowyou}}</span>{{$knowyou}}</div>
|
||||
|
@ -31,7 +30,6 @@
|
|||
<div class="intro-url"><span class="intro-url-label">{{$lbl_url}}:</span><a href="{{$zrl}}">{{$url}}</a></div>
|
||||
{{if $network}}<div class="intro-network"><span class="intro-network-label">{{$lbl_network}}</span>{{$network}}</div>{{/if}}
|
||||
{{if $location}}<div class="intro-location"><span class="intro-location-label">{{$lbl_location}}</span>{{$location}}</div>{{/if}}
|
||||
{{if $gender}}<div class="intro-gender"><span class="intro-gender-label">{{$lbl_gender}}</span>{{$gender}}</div>{{/if}}
|
||||
{{if $keywords}}<div class="intro-keywords"><span class="intro-keywords-label">{{$lbl_keywords}}</span>{{$keywords}}</div>{{/if}}
|
||||
{{if $about}}<div class="intro-about"><span class="intro-about-label">{{$lbl_about}}</span>{{$about nofilter}}</div>{{/if}}
|
||||
<div class="intro-knowyou"><span class="intro-knowyou-label">{{$lbl_knowyou}}</span>{{$knowyou}}</div>
|
||||
|
|
|
@ -98,13 +98,6 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $gender}}
|
||||
<div class="mf detail">
|
||||
<span class="gender-label icon"><i class="fa fa-venus-mars"></i></span>
|
||||
<span class="p-gender">{{$profile.gender}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.pubkey}}<div class="key u-key" style="display:none;">{{$profile.pubkey}}</div>{{/if}}
|
||||
|
||||
{{if $contacts}}<div class="contacts" style="display:none;">{{$contacts}}</div>{{/if}}
|
||||
|
|
|
@ -45,8 +45,6 @@
|
|||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $gender}}<dl class="mf"><dt class="gender-label">{{$gender}}</dt> <dd class="p-gender">{{$profile.gender}}</dd></dl>{{/if}}
|
||||
|
||||
{{if $profile.pubkey}}<div class="key" style="display:none;">{{$profile.pubkey}}</div>{{/if}}
|
||||
|
||||
{{if $homepage}}
|
||||
|
|
|
@ -4474,7 +4474,6 @@ hr.line-dots {
|
|||
|
||||
.location,
|
||||
.location-label,
|
||||
.gender-label,
|
||||
.homepage-label,
|
||||
.network-label {
|
||||
float: left;
|
||||
|
|
|
@ -42,8 +42,6 @@
|
|||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $gender}}<dl class="mf"><dt class="gender-label">{{$gender}}</dt> <dd class="p-gender">{{$profile.gender}}</dd></dl>{{/if}}
|
||||
|
||||
{{if $profile.pubkey}}<div class="key u-key" style="display:none;">{{$profile.pubkey}}</div>{{/if}}
|
||||
|
||||
{{if $contacts}}<div class="contacts" style="display:none;">{{$contacts}}</div>{{/if}}
|
||||
|
|
Loading…
Reference in a new issue