mirror of
https://github.com/friendica/friendica
synced 2025-04-26 11:50:11 +00:00
Revert "Move Objects to Model"
This commit is contained in:
parent
e437c74d0e
commit
5747cfc79c
77 changed files with 593 additions and 636 deletions
|
@ -1,44 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file src/Model/Profile.php
|
||||
*/
|
||||
|
||||
namespace Friendica\Model;
|
||||
|
||||
class Profile
|
||||
{
|
||||
/**
|
||||
* @brief Returns a formatted location string from the given profile array
|
||||
*
|
||||
* @param array $profile Profile array (Generated from the "profile" table)
|
||||
*
|
||||
* @return string Location string
|
||||
*/
|
||||
public static function formatLocation(array $profile)
|
||||
{
|
||||
$location = '';
|
||||
|
||||
if ($profile['locality']) {
|
||||
$location .= $profile['locality'];
|
||||
}
|
||||
|
||||
if ($profile['region'] && ($profile['locality'] != $profile['region'])) {
|
||||
if ($location) {
|
||||
$location .= ', ';
|
||||
}
|
||||
|
||||
$location .= $profile['region'];
|
||||
}
|
||||
|
||||
if ($profile['country-name']) {
|
||||
if ($location) {
|
||||
$location .= ', ';
|
||||
}
|
||||
|
||||
$location .= $profile['country-name'];
|
||||
}
|
||||
|
||||
return $location;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue