Poco fields now moved to the header, function to create formatted location string
This commit is contained in:
parent
c1f2b3a55e
commit
937196d6ee
4 changed files with 109 additions and 61 deletions
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
|
||||
require_once("include/Contact.php");
|
||||
|
||||
function profiles_init(&$a) {
|
||||
|
||||
|
@ -482,21 +482,7 @@ function profiles_post(&$a) {
|
|||
}
|
||||
|
||||
if($is_default) {
|
||||
$location = $locality;
|
||||
|
||||
if ($region != "") {
|
||||
if ($location != "")
|
||||
$location .= ", ";
|
||||
|
||||
$location .= $region;
|
||||
}
|
||||
|
||||
if ($country_name != "") {
|
||||
if ($location != "")
|
||||
$location .= ", ";
|
||||
|
||||
$location .= $country_name;
|
||||
}
|
||||
$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",
|
||||
dbesc($about),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue