]> git.mxchange.org Git - friendica.git/commitdiff
Remove usage of profile.gender
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 28 Jan 2020 04:00:18 +0000 (23:00 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 28 Jan 2020 04:00:18 +0000 (23:00 -0500)
doc/API-Entities.md
doc/Addons.md
doc/database/db_profile.md
doc/de/Addons.md
src/Content/ContactSelector.php
src/Model/Contact.php
src/Model/GContact.php
src/Model/Profile.php
src/Module/Directory.php
src/Module/NoScrape.php

index da59de77b06980dff5e93e90c74cbb649372ec8b..b234912acddb25583ab856ef32b04d5da0e0f6bc 100644 (file)
@@ -1181,54 +1181,6 @@ Mutually exclusive with <code>link</code>.
 <td></td>
 </tr>
 
-<tr>
-<td><code>hometown</code></td>
-<td>String</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>gender</code></td>
-<td>String</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>marital</code></td>
-<td>String</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>marital_with</code></td>
-<td>String</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>marital_since</code></td>
-<td>String (Date)</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>sexual</code></td>
-<td>String</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>politic</code></td>
-<td>String</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>religion</code></td>
-<td>String</td>
-<td></td>
-</tr>
-
 <tr>
 <td><code>public_keywords</code></td>
 <td>String</td>
@@ -1241,90 +1193,12 @@ Mutually exclusive with <code>link</code>.
 <td>Comma-separated list of words meant to be used for search only.</td>
 </tr>
 
-<tr>
-<td><code>likes</code></td>
-<td>String (Plaintext)</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>dislikes</code></td>
-<td>String (Plaintext)</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>about</code></td>
-<td>String (Plaintext)</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>music</code></td>
-<td>String (Plaintext)</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>book</code></td>
-<td>String (Plaintext)</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>tv</code></td>
-<td>String (Plaintext)</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>film</code></td>
-<td>String (Plaintext)</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>interest</code></td>
-<td>String (Plaintext)</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>romance</code></td>
-<td>String (Plaintext)</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>work</code></td>
-<td>String (Plaintext)</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>education</code></td>
-<td>String (Plaintext)</td>
-<td></td>
-</tr>
-
-<tr>
-<td><code>social_networks</code></td>
-<td>String (Plaintext)</td>
-<td></td>
-</tr>
-
 <tr>
 <td><code>homepage</code></td>
 <td>String (URL)</td>
 <td></td>
 </tr>
 
-<tr>
-<td><code>users</code></td>
-<td>List of <a href="help/API-Entities#Contact">Contacts</a></td>
-<td>If populated, only these contacts have access to the profile.</td>
-</tr>
-
 </tbody>
 </table>
 
index 171f58ff4af9643c65e7ba911ed025110e4bac4f..bf8f9eef456ae11d8d7bb85a39f1dd5a39dee171 100644 (file)
@@ -695,9 +695,6 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep-
 ### src/Content/ContactSelector.php
 
     Hook::callAll('network_to_name', $nets);
-    Hook::callAll('gender_selector', $select);
-    Hook::callAll('sexpref_selector', $select);
-    Hook::callAll('marital_selector', $select);
 
 ### src/Content/OEmbed.php
 
index 265eb1c58be9f89e862505e4ccbd372295e914b4..6b9689d12451e130e32a3b293f989d504316af53 100644 (file)
@@ -16,29 +16,29 @@ Table profile
 | region       |                                               | varchar(255) | NO   |     |                     |                |
 | postal-code  |                                               | varchar(32)  | NO   |     |                     |                |
 | country-name |                                               | varchar(255) | NO   |     |                     |                |
-| hometown     |                                               | varchar(255) | NO   | MUL |                     |                |
-| gender       |                                               | varchar(32)  | NO   |     |                     |                |
-| marital      |                                               | varchar(255) | NO   |     |                     |                |
-| with         |                                               | text         | NO   |     | NULL                |                |
-| howlong      |                                               | datetime     | NO   |     | 0001-01-01 00:00:00 |                |
-| sexual       |                                               | varchar(255) | NO   |     |                     |                |
-| politic      |                                               | varchar(255) | NO   |     |                     |                |
-| religion     |                                               | varchar(255) | NO   |     |                     |                |
+| hometown     | Deprecated                                    | varchar(255) | NO   | MUL |                     |                |
+| gender       | Deprecated                                    | varchar(32)  | NO   |     |                     |                |
+| marital      | Deprecated                                    | varchar(255) | NO   |     |                     |                |
+| with         | Deprecated                                    | text         | NO   |     | NULL                |                |
+| howlong      | Deprecated                                    | datetime     | NO   |     | 0001-01-01 00:00:00 |                |
+| sexual       | Deprecated                                    | varchar(255) | NO   |     |                     |                |
+| politic      | Deprecated                                    | varchar(255) | NO   |     |                     |                |
+| religion     | Deprecated                                    | varchar(255) | NO   |     |                     |                |
 | pub_keywords |                                               | text         | NO   |     | NULL                |                |
 | prv_keywords |                                               | text         | NO   |     | NULL                |                |
-| likes        |                                               | text         | NO   |     | NULL                |                |
-| dislikes     |                                               | text         | NO   |     | NULL                |                |
-| about        |                                               | text         | NO   |     | NULL                |                |
-| summary      |                                               | varchar(255) | NO   |     |                     |                |
-| music        |                                               | text         | NO   |     | NULL                |                |
-| book         |                                               | text         | NO   |     | NULL                |                |
-| tv           |                                               | text         | NO   |     | NULL                |                |
-| film         |                                               | text         | NO   |     | NULL                |                |
-| interest     |                                               | text         | NO   |     | NULL                |                |
-| romance      |                                               | text         | NO   |     | NULL                |                |
-| work         |                                               | text         | NO   |     | NULL                |                |
-| education    |                                               | text         | NO   |     | NULL                |                |
-| contact      |                                               | text         | NO   |     | NULL                |                |
+| likes        | Deprecated                                    | text         | NO   |     | NULL                |                |
+| dislikes     | Deprecated                                    | text         | NO   |     | NULL                |                |
+| about        | Deprecated                                    | text         | NO   |     | NULL                |                |
+| summary      | Deprecated                                    | varchar(255) | NO   |     |                     |                |
+| music        | Deprecated                                    | text         | NO   |     | NULL                |                |
+| book         | Deprecated                                    | text         | NO   |     | NULL                |                |
+| tv           | Deprecated                                    | text         | NO   |     | NULL                |                |
+| film         | Deprecated                                    | text         | NO   |     | NULL                |                |
+| interest     | Deprecated                                    | text         | NO   |     | NULL                |                |
+| romance      | Deprecated                                    | text         | NO   |     | NULL                |                |
+| work         | Deprecated                                    | text         | NO   |     | NULL                |                |
+| education    | Deprecated                                    | text         | NO   |     | NULL                |                |
+| contact      | Deprecated                                    | text         | NO   |     | NULL                |                |
 | homepage     |                                               | varchar(255) | NO   |     |                     |                |
 | photo        |                                               | varchar(255) | NO   |     |                     |                |
 | thumb        |                                               | varchar(255) | NO   |     |                     |                |
index 37bf114d2a976f23dd5622d7a5e32c1d9b8ed7f9..aba36bbea420e7973f748b8f8a1532ff9c1429e4 100644 (file)
@@ -408,9 +408,6 @@ Eine komplette Liste aller Hook-Callbacks mit den zugehörigen Dateien (am 01-Ap
 ### src/Content/ContactSelector.php
 
     Hook::callAll('network_to_name', $nets);
-    Hook::callAll('gender_selector', $select);
-    Hook::callAll('sexpref_selector', $select);
-    Hook::callAll('marital_selector', $select);
 
 ### src/Content/OEmbed.php
 
index a9c6bc269d9e80d7eac96322a93ec0ddca588022..64a2b5be9e4f4b92182a1f277a5408c88f27e6b2 100644 (file)
@@ -196,46 +196,6 @@ class ContactSelector
                return $network_icon;
        }
 
-       /**
-        * @param string $current optional, default empty
-        * @param string $suffix  optionsl, default empty
-        * @return string
-        * @throws \Friendica\Network\HTTPException\InternalServerErrorException
-        */
-       public static function gender($current = "", $suffix = "")
-       {
-               $o = '';
-               $select = [
-                       ''                 => DI::l10n()->t('No answer'),
-                       'Male'             => DI::l10n()->t('Male'),
-                       'Female'           => DI::l10n()->t('Female'),
-                       'Currently Male'   => DI::l10n()->t('Currently Male'),
-                       'Currently Female' => DI::l10n()->t('Currently Female'),
-                       'Mostly Male'      => DI::l10n()->t('Mostly Male'),
-                       'Mostly Female'    => DI::l10n()->t('Mostly Female'),
-                       'Transgender'      => DI::l10n()->t('Transgender'),
-                       'Intersex'         => DI::l10n()->t('Intersex'),
-                       'Transsexual'      => DI::l10n()->t('Transsexual'),
-                       'Hermaphrodite'    => DI::l10n()->t('Hermaphrodite'),
-                       'Neuter'           => DI::l10n()->t('Neuter'),
-                       'Non-specific'     => DI::l10n()->t('Non-specific'),
-                       'Other'            => DI::l10n()->t('Other'),
-                       'Undecided'        => DI::l10n()->t('Undecided'),
-               ];
-
-               Hook::callAll('gender_selector', $select);
-
-               $o .= "<select name=\"gender$suffix\" id=\"gender-select$suffix\" size=\"1\" >";
-               foreach ($select as $neutral => $selection) {
-                       if ($selection !== 'NOTRANSLATION') {
-                               $selected = (($neutral == $current) ? ' selected="selected" ' : '');
-                               $o .= "<option value=\"$neutral\" $selected >$selection</option>";
-                       }
-               }
-               $o .= '</select>';
-               return $o;
-       }
-
        /**
         * @param string $current optional, default empty
         * @param string $suffix  optionsl, default empty
index 201447437945e3aa075d1c60a95e120ee65fcb45..112a3f3fb12317e7f1cde3250fe577af0ac4c63c 100644 (file)
@@ -722,7 +722,7 @@ class Contact
                }
 
                $fields = ['name', 'photo', 'thumb', 'about', 'address', 'locality', 'region',
-                       'country-name', 'gender', 'pub_keywords', 'xmpp', 'net-publish'];
+                       'country-name', 'pub_keywords', 'xmpp', 'net-publish'];
                $profile = DBA::selectFirst('profile', $fields, ['uid' => $uid]);
                if (!DBA::isResult($profile)) {
                        return;
@@ -733,7 +733,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' => $profile['gender'], 'contact-type' => $user['account-type'],
+                       'gender' => '', 'contact-type' => $user['account-type'],
                        'xmpp' => $profile['xmpp']];
 
                $avatar = Photo::selectFirst(['resource-id', 'type'], ['uid' => $uid, 'profile' => true]);
index f669138d76b0e591537e809aaad9b4d20d28512b..05f20ec5b8063822cced6ea70aa276b838135f3f 100644 (file)
@@ -1117,7 +1117,7 @@ class GContact
                );
 
                $gcontact = ['name' => $userdata['name'], 'location' => $location, 'about' => $userdata['about'],
-                               'gender' => $userdata['gender'], 'keywords' => $userdata['pub_keywords'],
+                               'gender' => '', 'keywords' => $userdata['pub_keywords'],
                                'birthday' => $userdata['dob'], 'photo' => $userdata['photo'],
                                "notify" => $userdata['notify'], 'url' => $userdata['url'],
                                "hide" => ($userdata['hidewall'] || !$userdata['net-publish']),
index a8f3f6ac6f9daf22bb3577c57eefc1e31b8944f9..0da9fbf35972c15675e89ecdddbb07d12b5a1ba1 100644 (file)
@@ -919,7 +919,6 @@ class Profile
                                (`profile`.`locality` LIKE ?) OR
                                (`profile`.`region` LIKE ?) OR
                                (`profile`.`country-name` LIKE ?) OR
-                               (`profile`.`gender` LIKE ?) OR
                                (`profile`.`marital` LIKE ?) OR
                                (`profile`.`sexual` LIKE ?) OR
                                (`profile`.`about` LIKE ?) OR
@@ -961,7 +960,6 @@ class Profile
                                (`profile`.`locality` LIKE ?) OR
                                (`profile`.`region` LIKE ?) OR
                                (`profile`.`country-name` LIKE ?) OR
-                               (`profile`.`gender` LIKE ?) OR
                                (`profile`.`marital` LIKE ?) OR
                                (`profile`.`sexual` LIKE ?) OR
                                (`profile`.`about` LIKE ?) OR
index cc12e9dd211d6d72661a6a37f27a48365d6fc6bd..54fbb01ac86bd7343ad3434995998c63186c000e 100644 (file)
@@ -137,7 +137,6 @@ class Directory extends BaseModule
                        $location = '';
                }
 
-               $gender =   (!empty($profile['gender'])   ? DI::l10n()->t('Gender:')   : false);
                $marital =  (!empty($profile['marital'])  ? DI::l10n()->t('Status:')   : false);
                $homepage = (!empty($profile['homepage']) ? DI::l10n()->t('Homepage:') : false);
                $about =    (!empty($profile['about'])    ? DI::l10n()->t('About:')    : false);
@@ -160,7 +159,6 @@ class Directory extends BaseModule
                        'profile'      => $profile,
                        'location'     => $location_e,
                        'tags'         => $contact['pub_keywords'],
-                       'gender'       => $gender,
                        'pdesc'        => $pdesc,
                        'marital'      => $marital,
                        'homepage'     => $homepage,
index c8b701e403fd7db2a5070a77bd2b3c0d619e4efe..1df049525d8e0a26adcb72e1768f8013d2065f10 100644 (file)
@@ -103,7 +103,7 @@ class NoScrape extends BaseModule
                $json_info['last-activity'] = date('o-W', $last_active);
 
                //These are optional fields.
-               $profile_fields = ['pdesc', 'locality', 'region', 'postal-code', 'country-name', 'gender', 'marital', 'about'];
+               $profile_fields = ['pdesc', 'locality', 'region', 'postal-code', 'country-name', 'marital', 'about'];
                foreach ($profile_fields as $field) {
                        if (!empty($a->profile[$field])) {
                                $json_info["$field"] = $a->profile[$field];