]> git.mxchange.org Git - friendica.git/commitdiff
No more gender
authorMichael <heluecht@pirati.ca>
Sun, 16 Feb 2020 10:55:18 +0000 (10:55 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 16 Feb 2020 10:55:18 +0000 (10:55 +0000)
24 files changed:
mod/poco.php
src/Factory/Notification/Introduction.php
src/Model/Contact.php
src/Model/GContact.php
src/Model/Profile.php
src/Module/Contact/Hovercard.php
src/Module/Notifications/Introductions.php
src/Network/Probe.php
src/Object/Notification/Introduction.php
src/Protocol/Diaspora.php
src/Protocol/PortableContact.php
src/Repository/ProfileField.php
static/dbstructure.config.php
update.php
view/templates/notifications/intros.tpl
view/templates/profile/vcard.tpl
view/theme/duepuntozero/style.css
view/theme/duepuntozero/templates/profile/vcard.tpl
view/theme/frio/css/style.css
view/theme/frio/templates/notifications/intros.tpl
view/theme/frio/templates/profile/vcard.tpl
view/theme/quattro/templates/profile/vcard.tpl
view/theme/smoothly/style.css
view/theme/vier/templates/profile/vcard.tpl

index b306f2bf790e9f2831bef09d4271a196c7815408..802824ee5f0de4ff2e64371b135250d69f2fb152 100644 (file)
@@ -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'];
                                }
index bde73a7b0f3fa78994cf2f8b1e6613f18ef313c6..ddfb56948ace437a6285c4c395c6206d5c2be5ea 100644 (file)
@@ -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'],
index d3abc078ced9ad5bbba589b33f2f9bd86008bba4..df97bb17b1f17dd46ced0f9707ef12eca727d981 100644 (file)
@@ -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]);
index 9a8472128b8f346238820a147669c40ce64b2ce0..6dbd393f52aaa6515d80e3c8bec9f19f6ef06e76 100644 (file)
@@ -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']),
index c5c2cb36648c8146caa1e65a5865d81233cc6a3e..d91d56488ec3d2a8b89eb2194605b6577dfa3d4e 100644 (file)
@@ -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:'),
index 93495fd5a4a06ef7e1ac83edc0288da9c3a7584f..4ef81624009ddd004211e07c44c9817efab66a40 100644 (file)
@@ -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'],
index 45b7c266c647778b0c6ec96527774bfd0e3a684b..0b1cb9e6a39bfc42f408c4ef35933acdf568f6cc 100644 (file)
@@ -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,
index ec857836cc1162268e06d9e90f6fd6ef186d934e..b547c430564e9977e69e2f13e88faa8869bab271 100644 (file)
@@ -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"];
                }
index f2e6aecea5bd748afbd6aae4cedc021c93fcb7d8..33e0bf72af83b8f408c848dd26dac51d0406b964 100644 (file)
@@ -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'] ?? '';
        }
index 2dd3eba1e2c940befa788381589710c6f0b5cda9..8765c2156efa25158116e9f25923ce570580f215 100644 (file)
@@ -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,
index 4ff9ae98bf45b77b7f4d7cb2c22f50af1e435738..70acf5064c0e643dee8596190eff748678702d68 100644 (file)
@@ -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,
index b15084ea5bb5fa909dafb3b8fac422701a7a2382..7137191684868a51cdf46aab9fb253cf4309879b 100644 (file)
@@ -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:'),
index 303e4f7e0ce2a29574f7857e480b0a5d161f1dd0..9786664601364570d8074dfc49d2168d7a98e7d9 100755 (executable)
@@ -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" => ""],
index 06287516fa5250f30172e5c23d9c02f819f48543..49a220b6feff166200c6b9633fa3dee4a81c9653 100644 (file)
@@ -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')) {
index b5500d76aa7790fdbef15f9a358f37b45a2d6b22..3943e7232678c6e649b34eed9d27b1c0ea91f375 100644 (file)
@@ -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>
index 2b11bc4a3088bcab3ceab6dc7c1328a0baf87d43..0f27284cd6d963a3d4281df3168aeb2283efe928 100644 (file)
@@ -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}}
index 4b680a5955b575ad24431cab5e074afd707c92f3..3c8a18c88e2e2f37c68d4f75134f76b462ce9888 100644 (file)
@@ -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;
index 793b82386f47374504aa553e8527bcfd3b91b9c4..983d8faa5ccdc4f6e4f71cb17e41b54ee96fca76 100644 (file)
@@ -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}}
index 0a36194229e71860ad9283991415cc4472e10c01..d213a10d151b864d6a99763744c2de76fe629c49 100644 (file)
@@ -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;
index 57cac917545a402df355c94474d6a958dc0809e4..8271889aed44fe867059c3cbd551397d81d276d2 100644 (file)
@@ -19,7 +19,6 @@
                        <div class="intro-url"><span class="intro-url-label">{{$lbl_url}}:&nbsp;</span><a href="{{$zrl}}">{{$url}}</a></div>
                        {{if $network}}<div class="intro-network"><span class="intro-network-label">{{$lbl_network}}</span>&nbsp;{{$network}}</div>{{/if}}
                        {{if $location}}<div class="intro-location"><span class="intro-location-label">{{$lbl_location}}</span>&nbsp;{{$location}}</div>{{/if}}
-                       {{if $gender}}<div class="intro-gender"><span class="intro-gender-label">{{$lbl_gender}}</span>&nbsp;{{$gender}}</div>{{/if}}
                        {{if $keywords}}<div class="intro-keywords"><span class="intro-keywords-label">{{$lbl_keywords}}</span>&nbsp;{{$keywords}}</div>{{/if}}
                        {{if $about}}<div class="intro-about"><span class="intro-about-label">{{$lbl_about}}</span>&nbsp;{{$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>
index 4f7683dc0193732f22a293e2ce6fec0336818669..e32ab7bdd26ddee8031304d282c10a1695863489 100644 (file)
                </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}}
index 107e7850f0d8367d5a40af51d37ba961200397d2..605574bf805a0ba9c5abe2f4bd127890602ae95c 100644 (file)
@@ -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}}
index 235bc396264e74b54a7132da86e76ce46c55667c..f997f2545ffdecc82dd0d7b2800a97576199135f 100644 (file)
@@ -4474,7 +4474,6 @@ hr.line-dots {
 
 .location,
 .location-label,
-.gender-label,
 .homepage-label,
 .network-label {
        float: left;
index d6cf873b438f8d35154eb21f67c68f07c05a1788..5f52d2bea4f030de9eeb495daef3a409c0af500c 100644 (file)
@@ -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}}