]> git.mxchange.org Git - friendica.git/blobdiff - mod/profiles.php
Split the name in the hcard
[friendica.git] / mod / profiles.php
index bbce17c33b682c1f19b6da559dff9e8087efa6f6..893f0d51e34ba35cdd2e2271a93df29fffb383fc 100644 (file)
@@ -3,16 +3,16 @@
  * @file mod/profiles.php
  */
 use Friendica\App;
+use Friendica\Content\Feature;
 use Friendica\Core\Config;
 use Friendica\Core\PConfig;
 use Friendica\Core\System;
 use Friendica\Core\Worker;
 use Friendica\Database\DBM;
-use Friendica\Model\GlobalContact;
+use Friendica\Model\GContact;
+use Friendica\Model\Profile;
 use Friendica\Network\Probe;
 
-require_once 'include/Contact.php';
-
 function profiles_init(App $a) {
 
        nav_set_selected('profiles');
@@ -490,7 +490,7 @@ function profiles_post(App $a) {
                }
 
                if ($is_default) {
-                       $location = formatted_location(array("locality" => $locality, "region" => $region, "country-name" => $country_name));
+                       $location = Profile::formatLocation(array("locality" => $locality, "region" => $region, "country-name" => $country_name));
 
                        q("UPDATE `contact` SET `about` = '%s', `location` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `self` AND `uid` = %d",
                                dbesc($about),
@@ -509,7 +509,7 @@ function profiles_post(App $a) {
                        Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());
 
                        // Update the global contact for the user
-                       GlobalContact::updateForUser(local_user());
+                       GContact::updateForUser(local_user());
                }
        }
 }
@@ -674,10 +674,10 @@ function profiles_content(App $a) {
                                array(t('No'), t('Yes')) //Off - On strings
                        ),
 
-                       '$multi_profiles'               => feature_enabled(local_user(), 'multi_profiles'),
+                       '$multi_profiles'               => Feature::isEnabled(local_user(), 'multi_profiles'),
                        '$form_security_token'          => get_form_security_token("profile_edit"),
                        '$form_security_token_photo'    => get_form_security_token("profile_photo"),
-                       '$profile_clone_link'           => ((feature_enabled(local_user(), 'multi_profiles')) ? 'profiles/clone/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_clone") : ""),
+                       '$profile_clone_link'           => ((Feature::isEnabled(local_user(), 'multi_profiles')) ? 'profiles/clone/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_clone") : ""),
                        '$profile_drop_link'            => 'profiles/drop/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_drop"),
 
                        '$profile_action' => t('Profile Actions'),
@@ -755,7 +755,7 @@ function profiles_content(App $a) {
                return $o;
        } else {
                // If we don't support multi profiles, don't display this list.
-               if (!feature_enabled(local_user(), 'multi_profiles')) {
+               if (!Feature::isEnabled(local_user(), 'multi_profiles')) {
                        $r = q("SELECT * FROM `profile` WHERE `uid` = %d AND `is-default`=1",
                                local_user()
                        );