]> git.mxchange.org Git - friendica.git/commitdiff
Remove uses of the rest of deprecated profile fields
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 28 Jan 2020 04:05:57 +0000 (23:05 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 28 Jan 2020 04:06:30 +0000 (23:06 -0500)
13 files changed:
src/Content/ContactSelector.php
src/Model/Contact.php
src/Model/Profile.php
src/Module/Directory.php
src/Module/NoScrape.php
src/Network/Probe.php
view/templates/settings/profile/index.tpl
view/theme/duepuntozero/style.css
view/theme/quattro/dark/style.css
view/theme/quattro/green/style.css
view/theme/quattro/lilac/style.css
view/theme/quattro/quattro.less
view/theme/smoothly/style.css

index 2fd9f61fe4bea08bc9c3b61f8681b59f4e62b910..38227bc6e23a6dfb3ab9f17592a5446427fc547e 100644 (file)
@@ -19,7 +19,7 @@ class ContactSelector
        /**
         * @param string  $current  current
         * @param boolean $disabled optional, default false
-        * @return object
+        * @return string
         */
        public static function pollInterval($current, $disabled = false)
        {
@@ -47,7 +47,7 @@ class ContactSelector
        /**
         * @param string $profile Profile URL
         * @return string Server URL
-        * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+        * @throws \Exception
         */
        private static function getServerURLForProfile($profile)
        {
@@ -147,7 +147,7 @@ class ContactSelector
         * @param string $network network
         * @param string $profile optional, default empty
         * @return string
-        * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+        * @throws \Exception
         */
        public static function networkToIcon($network, $profile = "")
        {
@@ -195,43 +195,4 @@ 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 sexualPreference($current = "", $suffix = "")
-       {
-               $o = '';
-               $select = [
-                       ''              => DI::l10n()->t('No answer'),
-                       'Males'         => DI::l10n()->t('Males'),
-                       'Females'       => DI::l10n()->t('Females'),
-                       'Gay'           => DI::l10n()->t('Gay'),
-                       'Lesbian'       => DI::l10n()->t('Lesbian'),
-                       'No Preference' => DI::l10n()->t('No Preference'),
-                       'Bisexual'      => DI::l10n()->t('Bisexual'),
-                       'Autosexual'    => DI::l10n()->t('Autosexual'),
-                       'Abstinent'     => DI::l10n()->t('Abstinent'),
-                       'Virgin'        => DI::l10n()->t('Virgin'),
-                       'Deviant'       => DI::l10n()->t('Deviant'),
-                       'Fetish'        => DI::l10n()->t('Fetish'),
-                       'Oodles'        => DI::l10n()->t('Oodles'),
-                       'Nonsexual'     => DI::l10n()->t('Nonsexual'),
-               ];
-
-               Hook::callAll('sexpref_selector', $select);
-
-               $o .= "<select name=\"sexual$suffix\" id=\"sexual-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;
-       }
 }
index 112a3f3fb12317e7f1cde3250fe577af0ac4c63c..7b4314585676a6132171faa92ba9d654485bc048 100644 (file)
@@ -721,7 +721,7 @@ class Contact
                        return;
                }
 
-               $fields = ['name', 'photo', 'thumb', 'about', 'address', 'locality', 'region',
+               $fields = ['name', 'photo', 'thumb', 'pdesc' => 'about', 'address', 'locality', 'region',
                        'country-name', 'pub_keywords', 'xmpp', 'net-publish'];
                $profile = DBA::selectFirst('profile', $fields, ['uid' => $uid]);
                if (!DBA::isResult($profile)) {
index ff1575695d5e92869b69c61bd0086c90693f4779..caf0b0869d3fa1aab60312bfdeb782cbbd83577d 100644 (file)
@@ -913,11 +913,6 @@ class Profile
                                (`profile`.`locality` LIKE ?) OR
                                (`profile`.`region` LIKE ?) OR
                                (`profile`.`country-name` LIKE ?) OR
-                               (`profile`.`sexual` LIKE ?) OR
-                               (`profile`.`about` LIKE ?) OR
-                               (`profile`.`romance` LIKE ?) OR
-                               (`profile`.`work` LIKE ?) OR
-                               (`profile`.`education` LIKE ?) OR
                                (`profile`.`pub_keywords` LIKE ?) OR
                                (`profile`.`prv_keywords` LIKE ?))",
                                $searchTerm, $searchTerm, $searchTerm, $searchTerm, $searchTerm, $searchTerm, $searchTerm, $searchTerm,
@@ -953,11 +948,6 @@ class Profile
                                (`profile`.`locality` LIKE ?) OR
                                (`profile`.`region` LIKE ?) OR
                                (`profile`.`country-name` LIKE ?) OR
-                               (`profile`.`sexual` LIKE ?) OR
-                               (`profile`.`about` LIKE ?) OR
-                               (`profile`.`romance` LIKE ?) OR
-                               (`profile`.`work` LIKE ?) OR
-                               (`profile`.`education` LIKE ?) OR
                                (`profile`.`pub_keywords` LIKE ?) OR
                                (`profile`.`prv_keywords` LIKE ?))
                        $order LIMIT ?,?",
index 7a6b65cf78f24881f65b497a6eda3b4b698036d4..8335fb0cd46c1e49365661b8ea3b0d1874741c59 100644 (file)
@@ -138,7 +138,6 @@ class Directory extends BaseModule
                }
 
                $homepage = (!empty($profile['homepage']) ? DI::l10n()->t('Homepage:') : false);
-               $about =    (!empty($profile['about'])    ? DI::l10n()->t('About:')    : false);
 
                $location_e = $location;
 
@@ -160,7 +159,6 @@ class Directory extends BaseModule
                        'tags'         => $contact['pub_keywords'],
                        'pdesc'        => $pdesc,
                        'homepage'     => $homepage,
-                       'about'        => $about,
                        'photo_menu'   => $photo_menu,
 
                ];
index 07ecf23d8ac26d9ec87cc6e67563001be3beca0f..2a705ff6eaf9d767334ff6360911efb911480611 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', 'about'];
+               $profile_fields = ['pdesc', 'locality', 'region', 'postal-code', 'country-name'];
                foreach ($profile_fields as $field) {
                        if (!empty($a->profile[$field])) {
                                $json_info["$field"] = $a->profile[$field];
index 4cd32b91aea7c13474884e6cd6357d30bfab2c73..91d894d2ee9ede193683747adaad0196f34a98a8 100644 (file)
@@ -833,9 +833,6 @@ class Probe
                        if (!empty($profile['country'])) {
                                $loc['country-name'] = $profile['country'];
                        }
-                       if (!empty($profile['hometown'])) {
-                               $loc['locality'] = $profile['hometown'];
-                       }
                        $location = Profile::formatLocation($loc);
                        if (!empty($location)) {
                                $data['location'] = $location;
index bf98bb158717231a333d713d6006945393dd0321..c55928127e8d1ad723b99e75df984e9d30ae6504 100644 (file)
@@ -64,7 +64,7 @@
                                <option>temp</option>
                        </select>
                </div>
-               <div id="profile-edit-hometown-end"></div>
+               <div id="profile-edit-region-end"></div>
                <div class="profile-edit-submit-wrapper">
                        <input type="submit" name="submit" class="profile-edit-submit-button" value="{{$submit}}"/>
                </div>
index 3e8151c5ac1ffc9c130a68688ae471048086feaa..b30a7d4ed8f4623e9e5bcb9f987b95b74117296b 100644 (file)
@@ -733,21 +733,15 @@ input#dfrn-url {
 #profile-edit-profile-name-label,
 #profile-edit-name-label,
 #profile-edit-pdesc-label,
-#profile-edit-gender-label,
 #profile-edit-dob-label,
 #profile-edit-address-label,
 #profile-edit-locality-label,
 #profile-edit-region-label,
 #profile-edit-postal-code-label,
 #profile-edit-country-name-label,
-#profile-edit-marital-label,
-#profile-edit-sexual-label,
-#profile-edit-politic-label,
-#profile-edit-religion-label,
 #profile-edit-pubkeywords-label,
 #profile-edit-prvkeywords-label,
-#profile-edit-homepage-label,
-#profile-edit-hometown-label {
+#profile-edit-homepage-label {
        float: left;
        width: 175px;
 }
@@ -755,17 +749,12 @@ input#dfrn-url {
 #profile-edit-profile-name,
 #profile-edit-name,
 #profile-edit-pdesc,
-#gender-select,
 #profile-edit-dob,
 #profile-edit-address,
 #profile-edit-locality,
 #profile-edit-region,
 #profile-edit-postal-code,
 #profile-edit-country-name,
-#marital-select,
-#sexual-select,
-#profile-edit-politic,
-#profile-edit-religion,
 #profile-edit-pubkeywords,
 #profile-edit-prvkeywords,
 #profile-in-dir-yes,
@@ -842,7 +831,7 @@ input#dfrn-url {
 }
 
 
-#profile-edit-homepage, #profile-edit-hometown {
+#profile-edit-homepage {
        float: left;
        margin-bottom: 35px;
 }
@@ -865,24 +854,17 @@ input#dfrn-url {
     margin-bottom: 20px
 }
 
-#profile-edit-profile-name-end,
 #profile-edit-name-end,
 #profile-edit-pdesc-end,
-#profile-edit-gender-end,
 #profile-edit-dob-end,
 #profile-edit-address-end,
 #profile-edit-locality-end,
 #profile-edit-region-end,
 #profile-edit-postal-code-end,
 #profile-edit-country-name-end,
-#profile-edit-marital-end,
-#profile-edit-sexual-end,
-#profile-edit-politic-end,
-#profile-edit-religion-end,
 #profile-edit-pubkeywords-end,
 #profile-edit-prvkeywords-end,
 #profile-edit-homepage-end,
-#profile-edit-hometown-end,
 #profile-in-dir-break,
 #profile-in-dir-end,
 #profile-in-netdir-break,
@@ -909,10 +891,6 @@ input#dfrn-url {
 }
 
 
-#gender-select, #marital-select, #sexual-select {
-       width: 220px;
-}
-
 #profile-edit-profile-name-wrapper .required {
        color: #FF0000;
        float: left;
@@ -1589,113 +1567,6 @@ blockquote.shared_content {
 }
 
 
-#advanced-profile-name-wrapper,
-#advanced-profile-gender-wrapper,
-#advanced-profile-dob-wrapper,
-#advanced-profile-age-wrapper,
-#advanced-profile-marital-wrapper,
-#advanced-profile-sexual-wrapper,
-#advanced-profile-homepage-wrapper,
-#advanced-profile-politic-wrapper,
-#advanced-profile-religion-wrapper,
-#advanced-profile-about-wrapper,
-#advanced-profile-interest-wrapper,
-#advanced-profile-contact-wrapper,
-#advanced-profile-music-wrapper,
-#advanced-profile-book-wrapper,
-#advanced-profile-tv-wrapper,
-#advanced-profile-film-wrapper,
-#advanced-profile-romance-wrapper,
-#advanced-profile-work-wrapper,
-#advanced-profile-education-wrapper {
-       margin-top: 20px;
-}
-
-#advanced-profile-name-text,
-#advanced-profile-gender-text,
-#advanced-profile-dob-text,
-#advanced-profile-age-text,
-#advanced-profile-marital-text,
-#advanced-profile-sexual-text,
-#advanced-profile-homepage-text,
-#advanced-profile-politic-text,
-#advanced-profile-religion-text,
-#advanced-profile-about-text,
-#advanced-profile-interest-text,
-#advanced-profile-contact-text,
-#advanced-profile-music-text,
-#advanced-profile-book-text,
-#advanced-profile-tv-text,
-#advanced-profile-film-text,
-#advanced-profile-romance-text,
-#advanced-profile-work-text,
-#advanced-profile-education-text {
-       width: 300px;
-       float: left;
-}
-
-#advanced-profile-name-end,
-#advanced-profile-gender-end,
-#advanced-profile-dob-end,
-#advanced-profile-age-end,
-#advanced-profile-marital-end,
-#advanced-profile-sexual-end,
-#advanced-profile-homepage-end,
-#advanced-profile-politic-end,
-#advanced-profile-religion-end {
-       height: 10px;
-}
-
-#advanced-profile-about-end,
-#advanced-profile-interest-end,
-#advanced-profile-contact-end,
-#advanced-profile-music-end,
-#advanced-profile-book-end,
-#advanced-profile-tv-end,
-#advanced-profile-film-end,
-#advanced-profile-romance-end,
-#advanced-profile-work-end,
-#advanced-profile-education-end {
-
-
-}
-
-#advanced-profile-name,
-#advanced-profile-gender,
-#advanced-profile-dob,
-#advanced-profile-age,
-#advanced-profile-marital,
-#advanced-profile-sexual,
-#advanced-profile-homepage,
-#advanced-profile-politic,
-#advanced-profile-religion {
-       float: left;
-
-}
-
-
-#advanced-profile-about,
-#advanced-profile-interest,
-#advanced-profile-contact,
-#advanced-profile-music,
-#advanced-profile-book,
-#advanced-profile-tv,
-#advanced-profile-film,
-#advanced-profile-romance,
-#advanced-profile-work,
-#advanced-profile-education {
-       margin-top: 10px;
-       margin-left: 50px;
-       margin-right: 20px;
-       padding: 10px;
-       border: 1px solid #CCCCCC;
-}
-
-#advanced-profile-with {
-       float: left;
-       margin-left: 15px;
-}
-
 #contact-edit-wrapper {
        margin-top: 10px;
 }
@@ -2446,14 +2317,14 @@ aside input[type='text'] {
        margin-bottom: 25px;
 }
 
-.location-label, .gender-label, .marital-label, .homepage-label, .network-label {
+.location-label, .gender-label, .homepage-label, .network-label {
        float: left;
        text-align: right;
        display: block;
        width: 65px;
 }
 
-.adr, .x-gender, .marital-text, .homepage-url, .x-network {
+.adr, .homepage-url, .x-network {
        float: left;
        display: block;
        margin-left: 8px;
index 64e4840e86031bd8e126f2422b816474cd2a9c60..5f9e233c98d96e6553f388830e4176eb9e68a66a 100644 (file)
@@ -1973,45 +1973,29 @@ ul.tabs li .active {
   background-color: #FFEEEE;
   padding: 7px;
 }
-#profile-edit-profile-name-label,
 #profile-edit-name-label,
 #profile-edit-pdesc-label,
-#profile-edit-gender-label,
 #profile-edit-dob-label,
 #profile-edit-address-label,
 #profile-edit-locality-label,
 #profile-edit-region-label,
 #profile-edit-postal-code-label,
 #profile-edit-country-name-label,
-#profile-edit-marital-label,
-#profile-edit-with-label,
-#profile-edit-sexual-label,
-#profile-edit-politic-label,
-#profile-edit-religion-label,
 #profile-edit-pubkeywords-label,
 #profile-edit-prvkeywords-label,
-#profile-edit-gender-select,
 #profile-edit-homepage-label {
   float: left;
   width: 175px;
   padding-top: 7px;
 }
-#profile-edit-profile-name,
 #profile-edit-name,
-#gender-select,
 #profile-edit-pdesc,
-#profile-edit-gender,
 #profile-edit-dob,
 #profile-edit-address,
 #profile-edit-locality,
 #profile-edit-region,
 #profile-edit-postal-code,
 #profile-edit-country-name,
-#profile-edit-marital,
-#profile-edit-with,
-#profile-edit-sexual,
-#profile-edit-politic,
-#profile-edit-religion,
 #profile-edit-pubkeywords,
 #profile-edit-prvkeywords,
 #profile-edit-homepage {
index 40a0c71617cee22a7fd10e81e82932a130685ae0..81a30cf0884dee6fb40bdf6702b6c6a64cef885f 100644 (file)
@@ -1973,45 +1973,29 @@ ul.tabs li .active {
   background-color: #FFEEEE;
   padding: 7px;
 }
-#profile-edit-profile-name-label,
 #profile-edit-name-label,
 #profile-edit-pdesc-label,
-#profile-edit-gender-label,
 #profile-edit-dob-label,
 #profile-edit-address-label,
 #profile-edit-locality-label,
 #profile-edit-region-label,
 #profile-edit-postal-code-label,
 #profile-edit-country-name-label,
-#profile-edit-marital-label,
-#profile-edit-with-label,
-#profile-edit-sexual-label,
-#profile-edit-politic-label,
-#profile-edit-religion-label,
 #profile-edit-pubkeywords-label,
 #profile-edit-prvkeywords-label,
-#profile-edit-gender-select,
 #profile-edit-homepage-label {
   float: left;
   width: 175px;
   padding-top: 7px;
 }
-#profile-edit-profile-name,
 #profile-edit-name,
-#gender-select,
 #profile-edit-pdesc,
-#profile-edit-gender,
 #profile-edit-dob,
 #profile-edit-address,
 #profile-edit-locality,
 #profile-edit-region,
 #profile-edit-postal-code,
 #profile-edit-country-name,
-#profile-edit-marital,
-#profile-edit-with,
-#profile-edit-sexual,
-#profile-edit-politic,
-#profile-edit-religion,
 #profile-edit-pubkeywords,
 #profile-edit-prvkeywords,
 #profile-edit-homepage {
index 16887f1e6a16c1edcc40a66b9aa5db254830494b..7585877ae20681f1ddd6e994e976eef78ef057da 100644 (file)
@@ -1973,45 +1973,29 @@ ul.tabs li .active {
   background-color: #FFEEEE;
   padding: 7px;
 }
-#profile-edit-profile-name-label,
 #profile-edit-name-label,
 #profile-edit-pdesc-label,
-#profile-edit-gender-label,
 #profile-edit-dob-label,
 #profile-edit-address-label,
 #profile-edit-locality-label,
 #profile-edit-region-label,
 #profile-edit-postal-code-label,
 #profile-edit-country-name-label,
-#profile-edit-marital-label,
-#profile-edit-with-label,
-#profile-edit-sexual-label,
-#profile-edit-politic-label,
-#profile-edit-religion-label,
 #profile-edit-pubkeywords-label,
 #profile-edit-prvkeywords-label,
-#profile-edit-gender-select,
 #profile-edit-homepage-label {
   float: left;
   width: 175px;
   padding-top: 7px;
 }
-#profile-edit-profile-name,
 #profile-edit-name,
-#gender-select,
 #profile-edit-pdesc,
-#profile-edit-gender,
 #profile-edit-dob,
 #profile-edit-address,
 #profile-edit-locality,
 #profile-edit-region,
 #profile-edit-postal-code,
 #profile-edit-country-name,
-#profile-edit-marital,
-#profile-edit-with,
-#profile-edit-sexual,
-#profile-edit-politic,
-#profile-edit-religion,
 #profile-edit-pubkeywords,
 #profile-edit-prvkeywords,
 #profile-edit-homepage {
index ce5c038d7d54bab74408dbb7f779c36e8697abe7..5f435241c9e2de6a9e6e633baa455056e984ac67 100644 (file)
@@ -1267,45 +1267,29 @@ ul.tabs {
        background-color: #FFEEEE;
        padding: 7px;
 }
-#profile-edit-profile-name-label,
 #profile-edit-name-label,
 #profile-edit-pdesc-label,
-#profile-edit-gender-label,
 #profile-edit-dob-label,
 #profile-edit-address-label,
 #profile-edit-locality-label,
 #profile-edit-region-label,
 #profile-edit-postal-code-label,
 #profile-edit-country-name-label,
-#profile-edit-marital-label,
-#profile-edit-with-label,
-#profile-edit-sexual-label,
-#profile-edit-politic-label,
-#profile-edit-religion-label,
 #profile-edit-pubkeywords-label,
 #profile-edit-prvkeywords-label,
-#profile-edit-gender-select,
 #profile-edit-homepage-label {
        float: left;
        width: 175px;
         padding-top: 7px;
 }
-#profile-edit-profile-name,
 #profile-edit-name,
-#gender-select,
 #profile-edit-pdesc,
-#profile-edit-gender,
 #profile-edit-dob,
 #profile-edit-address,
 #profile-edit-locality,
 #profile-edit-region,
 #profile-edit-postal-code,
 #profile-edit-country-name,
-#profile-edit-marital,
-#profile-edit-with,
-#profile-edit-sexual,
-#profile-edit-politic,
-#profile-edit-religion,
 #profile-edit-pubkeywords,
 #profile-edit-prvkeywords,
 #profile-edit-homepage {
index 52324c0a9756264f1b015e0525c7520510cb9cec..081f1710a9c3dacb8f468213ad3f3a592959f225 100644 (file)
@@ -2046,20 +2046,6 @@ pre code {
 /* = Profile = */
 /* =========== */
 
-.advanced-profile-content {
-       margin-top: 5px;
-       margin-bottom: 10px;
-       margin-left: 30px;
-       width: 60%;
-}
-
-.advanced-profile-label {
-       margin-top: 10px;
-       margin-bottom: 0px;
-       padding-bottom: 5px;
-       font-size: 18px;
-}
-
 div[id$="wrapper"] {
        height: 100%;
 }
@@ -2068,10 +2054,6 @@ div[id$="wrapper"] br {
        clear: left;
 }
 
-#advanced-profile-with {
-       margin-left: 20px;
-}
-
 #profile-listing-desc,
 #profile-listing-new-link-wrapper {
        float: left;
@@ -4524,7 +4506,6 @@ hr.line-dots {
 .location,
 .location-label,
 .gender-label,
-.marital-label,
 .homepage-label,
 .network-label {
        float: left;
@@ -4534,8 +4515,6 @@ hr.line-dots {
 }
 
 .adr,
-.x-gender,
-.marital-text,
 .homepage-url,
 .x-network {
        float: left;