diff --git a/mod/poco.php b/mod/poco.php index b306f2bf79..802824ee5f 100644 --- a/mod/poco.php +++ b/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']; } diff --git a/src/Factory/Notification/Introduction.php b/src/Factory/Notification/Introduction.php index bde73a7b0f..ddfb56948a 100644 --- a/src/Factory/Notification/Introduction.php +++ b/src/Factory/Notification/Introduction.php @@ -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'], diff --git a/src/Model/Contact.php b/src/Model/Contact.php index d3abc078ce..df97bb17b1 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -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]); diff --git a/src/Model/GContact.php b/src/Model/GContact.php index 9a8472128b..6dbd393f52 100644 --- a/src/Model/GContact.php +++ b/src/Model/GContact.php @@ -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']), diff --git a/src/Model/Profile.php b/src/Model/Profile.php index c5c2cb3664..d91d56488e 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -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:'), diff --git a/src/Module/Contact/Hovercard.php b/src/Module/Contact/Hovercard.php index 93495fd5a4..4ef8162400 100644 --- a/src/Module/Contact/Hovercard.php +++ b/src/Module/Contact/Hovercard.php @@ -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'], diff --git a/src/Module/Notifications/Introductions.php b/src/Module/Notifications/Introductions.php index 45b7c266c6..0b1cb9e6a3 100644 --- a/src/Module/Notifications/Introductions.php +++ b/src/Module/Notifications/Introductions.php @@ -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, diff --git a/src/Network/Probe.php b/src/Network/Probe.php index ec857836cc..b547c43056 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -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"]; } diff --git a/src/Object/Notification/Introduction.php b/src/Object/Notification/Introduction.php index f2e6aecea5..33e0bf72af 100644 --- a/src/Object/Notification/Introduction.php +++ b/src/Object/Notification/Introduction.php @@ -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'] ?? ''; } diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 2dd3eba1e2..8765c2156e 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -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, diff --git a/src/Protocol/PortableContact.php b/src/Protocol/PortableContact.php index 4ff9ae98bf..70acf5064c 100644 --- a/src/Protocol/PortableContact.php +++ b/src/Protocol/PortableContact.php @@ -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, diff --git a/src/Repository/ProfileField.php b/src/Repository/ProfileField.php index b15084ea5b..7137191684 100644 --- a/src/Repository/ProfileField.php +++ b/src/Repository/ProfileField.php @@ -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:'), diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 303e4f7e0c..9786664601 100755 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -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" => ""], diff --git a/update.php b/update.php index 06287516fa..314b166e72 100644 --- a/update.php +++ b/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; diff --git a/view/templates/notifications/intros.tpl b/view/templates/notifications/intros.tpl index b5500d76aa..3943e72326 100644 --- a/view/templates/notifications/intros.tpl +++ b/view/templates/notifications/intros.tpl @@ -6,7 +6,6 @@ {{$fullname}}
{{$lbl_url}}
{{$url}}
{{if $location}}
{{$lbl_location}}
{{$location}}
{{/if}} -{{if $gender}}
{{$lbl_gender}}
{{$gender}}
{{/if}} {{if $keywords}}
{{$lbl_keywords}}
{{$keywords}}
{{/if}} {{if $about}}
{{$lbl_about}}
{{$about nofilter}}
{{/if}}
{{$lbl_knowyou}} {{$knowyou}}
diff --git a/view/templates/profile/vcard.tpl b/view/templates/profile/vcard.tpl index 2b11bc4a30..0f27284cd6 100644 --- a/view/templates/profile/vcard.tpl +++ b/view/templates/profile/vcard.tpl @@ -35,8 +35,6 @@ {{/if}} - {{if $gender}}
{{$gender}}
{{$profile.gender}}
{{/if}} - {{if $profile.pubkey}}{{/if}} {{if $contacts}}{{/if}} diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 4b680a5955..3c8a18c88e 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -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; diff --git a/view/theme/duepuntozero/templates/profile/vcard.tpl b/view/theme/duepuntozero/templates/profile/vcard.tpl index 793b82386f..983d8faa5c 100644 --- a/view/theme/duepuntozero/templates/profile/vcard.tpl +++ b/view/theme/duepuntozero/templates/profile/vcard.tpl @@ -26,8 +26,6 @@ {{/if}} - {{if $gender}}
{{$gender}}
{{$profile.gender}}
{{/if}} - {{if $profile.pubkey}}{{/if}} {{if $homepage}}
{{$homepage}}
{{$profile.homepage}}
{{/if}} diff --git a/view/theme/frio/css/style.css b/view/theme/frio/css/style.css index 0a36194229..d213a10d15 100644 --- a/view/theme/frio/css/style.css +++ b/view/theme/frio/css/style.css @@ -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; diff --git a/view/theme/frio/templates/notifications/intros.tpl b/view/theme/frio/templates/notifications/intros.tpl index 57cac91754..8271889aed 100644 --- a/view/theme/frio/templates/notifications/intros.tpl +++ b/view/theme/frio/templates/notifications/intros.tpl @@ -19,7 +19,6 @@
{{$lbl_url}}: {{$url}}
{{if $network}}
{{$lbl_network}} {{$network}}
{{/if}} {{if $location}}
{{$lbl_location}} {{$location}}
{{/if}} - {{if $gender}}
{{$lbl_gender}} {{$gender}}
{{/if}} {{if $keywords}}
{{$lbl_keywords}} {{$keywords}}
{{/if}} {{if $about}}
{{$lbl_about}} {{$about nofilter}}
{{/if}}
{{$lbl_knowyou}}{{$knowyou}}
@@ -31,7 +30,6 @@
{{$lbl_url}}:{{$url}}
{{if $network}}
{{$lbl_network}}{{$network}}
{{/if}} {{if $location}}
{{$lbl_location}}{{$location}}
{{/if}} - {{if $gender}}
{{$lbl_gender}}{{$gender}}
{{/if}} {{if $keywords}}
{{$lbl_keywords}}{{$keywords}}
{{/if}} {{if $about}}
{{$lbl_about}}{{$about nofilter}}
{{/if}}
{{$lbl_knowyou}}{{$knowyou}}
diff --git a/view/theme/frio/templates/profile/vcard.tpl b/view/theme/frio/templates/profile/vcard.tpl index 4f7683dc01..e32ab7bdd2 100644 --- a/view/theme/frio/templates/profile/vcard.tpl +++ b/view/theme/frio/templates/profile/vcard.tpl @@ -98,13 +98,6 @@ {{/if}} - {{if $gender}} -
- - {{$profile.gender}} -
- {{/if}} - {{if $profile.pubkey}}{{/if}} {{if $contacts}}{{/if}} diff --git a/view/theme/quattro/templates/profile/vcard.tpl b/view/theme/quattro/templates/profile/vcard.tpl index 107e7850f0..605574bf80 100644 --- a/view/theme/quattro/templates/profile/vcard.tpl +++ b/view/theme/quattro/templates/profile/vcard.tpl @@ -45,8 +45,6 @@ {{/if}} - {{if $gender}}
{{$gender}}
{{$profile.gender}}
{{/if}} - {{if $profile.pubkey}}{{/if}} {{if $homepage}} diff --git a/view/theme/smoothly/style.css b/view/theme/smoothly/style.css index 235bc39626..f997f2545f 100644 --- a/view/theme/smoothly/style.css +++ b/view/theme/smoothly/style.css @@ -4474,7 +4474,6 @@ hr.line-dots { .location, .location-label, -.gender-label, .homepage-label, .network-label { float: left; diff --git a/view/theme/vier/templates/profile/vcard.tpl b/view/theme/vier/templates/profile/vcard.tpl index d6cf873b43..5f52d2bea4 100644 --- a/view/theme/vier/templates/profile/vcard.tpl +++ b/view/theme/vier/templates/profile/vcard.tpl @@ -42,8 +42,6 @@ {{/if}} - {{if $gender}}
{{$gender}}
{{$profile.gender}}
{{/if}} - {{if $profile.pubkey}}{{/if}} {{if $contacts}}{{/if}}