4 * @file src/Model/Profile.php
7 namespace Friendica\Model;
12 * @brief Returns a formatted location string from the given profile array
14 * @param array $profile Profile array (Generated from the "profile" table)
16 * @return string Location string
18 public static function formatLocation(array $profile)
22 if ($profile['locality']) {
23 $location .= $profile['locality'];
26 if ($profile['region'] && ($profile['locality'] != $profile['region'])) {
31 $location .= $profile['region'];
34 if ($profile['country-name']) {
39 $location .= $profile['country-name'];