*/
use Friendica\App;
+use Friendica\Content\Feature;
use Friendica\Content\ForumManager;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
-use Friendica\Object\Contact;
+use Friendica\Model\Contact;
+use Friendica\Protocol\Diaspora;
require_once 'include/bbcode.php';
require_once 'mod/proxy.php';
}
// show edit profile to yourself
- if (!$is_contact && $profile['uid'] == local_user() && feature_enabled(local_user(), 'multi_profiles')) {
+ if (!$is_contact && $profile['uid'] == local_user() && Feature::isEnabled(local_user(), 'multi_profiles')) {
$profile['edit'] = array(System::baseUrl(). '/profiles', t('Profiles'),"", t('Manage/edit profiles'));
$r = q(
"SELECT * FROM `profile` WHERE `uid` = %d",
}
}
}
- if (!$is_contact && $profile['uid'] == local_user() && !feature_enabled(local_user(), 'multi_profiles')) {
+ if (!$is_contact && $profile['uid'] == local_user() && !Feature::isEnabled(local_user(), 'multi_profiles')) {
$profile['edit'] = array(System::baseUrl(). '/profiles/'.$profile['id'], t('Edit profile'),"", t('Edit profile'));
$profile['menu'] = array(
'chg_photo' => t('Change profile photo'),
$location = $pdesc = $gender = $marital = $homepage = $about = false;
}
- $firstname = ((strpos($profile['name'], ' '))
- ? trim(substr($profile['name'], 0, strpos($profile['name'], ' '))) : $profile['name']);
- $lastname = (($firstname === $profile['name']) ? '' : trim(substr($profile['name'], strlen($firstname))));
+ $split_name = Diaspora::splitName($profile['name']);
+ $firstname = $split_name['first'];
+ $lastname = $split_name['last'];
if ($profile['guid'] != "") {
$diaspora = array(
$p["photo"] = proxy_url($p["photo"], false, PROXY_SIZE_SMALL);
}
- if ($a->theme['template_engine'] === 'internal') {
- $location = template_escape($location);
- }
-
$tpl = get_markup_template('profile_vcard.tpl');
$o .= replace_macros(
$tpl,
}
//show subcribed forum if it is enabled in the usersettings
- if (feature_enabled($uid, 'forumlist_profile')) {
+ if (Feature::isEnabled($uid, 'forumlist_profile')) {
$profile['forumlist'] = array( t('Forums:'), ForumManager::profileAdvanced($uid));
}