The global contact for server users is now stored directly
This commit is contained in:
parent
90155da59a
commit
3df235e5bd
4 changed files with 22 additions and 8 deletions
|
|
@ -484,7 +484,7 @@ function profiles_post(&$a) {
|
|||
if($is_default) {
|
||||
$location = formatted_location(array("locality" => $locality, "region" => $region, "country-name" => $country_name));
|
||||
|
||||
$r = q("UPDATE `contact` SET `about` = '%s', `location` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `self` = 1 AND `uid` = %d",
|
||||
q("UPDATE `contact` SET `about` = '%s', `location` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `self` AND `uid` = %d",
|
||||
dbesc($about),
|
||||
dbesc($location),
|
||||
dbesc($pub_keywords),
|
||||
|
|
@ -492,6 +492,17 @@ function profiles_post(&$a) {
|
|||
intval(local_user())
|
||||
);
|
||||
|
||||
$r = q("SELECT `avatar`, `notify`, `url` FROM `contact` WHERE `self` AND `uid` = %d",
|
||||
intval(local_user()));
|
||||
|
||||
$gcontact = array("name" => $name, "location" => $location, "about" => $about,
|
||||
"gender" => $gender, "keywords" => $pub_keywords, "birthday" => $dob,
|
||||
"photo" => $r[0]["avatar"], "notify" => $r[0]["notify"],
|
||||
"generation" => 1, "network" => NETWORK_DFRN,
|
||||
"url" => $r[0]["url"], "updated" => datetime_convert());
|
||||
|
||||
update_gcontact($gcontact);
|
||||
|
||||
// Update global directory in background
|
||||
$url = $_SESSION['my_url'];
|
||||
if($url && strlen(get_config('system','directory')))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue