X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fprofiles.php;h=893f0d51e34ba35cdd2e2271a93df29fffb383fc;hb=eb1b6605b7d94e985786f93e910d6dce2dd9bad1;hp=fe26d8f56187e92b0e1b86c440cafcd13f7743d9;hpb=9e99066fd70a9dd9a291a523afba1a390f0e3a0b;p=friendica.git diff --git a/mod/profiles.php b/mod/profiles.php index fe26d8f561..893f0d51e3 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -1,16 +1,18 @@ $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), @@ -501,13 +503,13 @@ function profiles_post(App $a) { // Update global directory in background $url = $_SESSION['my_url']; if ($url && strlen(Config::get('system', 'directory'))) { - Worker::add(PRIORITY_LOW, "directory", $url); + Worker::add(PRIORITY_LOW, "Directory", $url); } - Worker::add(PRIORITY_LOW, 'profile_update', local_user()); + Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user()); // Update the global contact for the user - update_gcontact_for_user(local_user()); + GContact::updateForUser(local_user()); } } } @@ -598,7 +600,7 @@ function profile_activity($changed, $value) { $i = item_store($arr); if ($i) { - Worker::add(PRIORITY_HIGH, "notifier", "activity", $i); + Worker::add(PRIORITY_HIGH, "Notifier", "activity", $i); } } @@ -672,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'), @@ -752,9 +754,8 @@ 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() );