if (!$id) {
$this->profile = false;
} else {
- $this->profile = Profile::staticGet('id', $id);
+ $this->profile = Profile::getKV('id', $id);
if (!$this->profile) {
// TRANS: Client error displayed when referring to non-existing profile ID.
$this->clientError(_('No profile with that ID.'));
- return false;
}
}
// TRANS: Client error displayed when trying to tag a user that cannot be tagged.
$this->clientError(_('You cannot tag this user.'));
}
- return true;
}
function handle($args)
$this->elementStart('body');
$this->element('p', 'error', $error);
$this->elementEnd('body');
- $this->elementEnd('html');
+ $this->endHTML();
} else {
$this->showPage();
}
function showContent()
{
if (Event::handle('StartShowTagProfileForm', array($this, $this->profile)) && $this->profile) {
- $this->elementStart('div', 'entity_profile vcard author');
+ $this->elementStart('div', 'entity_profile h-card p-author');
// TRANS: Header in list form.
$this->element('h2', null, _('User profile'));
- $avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE);
- $this->element('img', array('src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE),
+ $avatarUrl = $this->profile->avatarUrl(AVATAR_PROFILE_SIZE);
+ $this->element('img', array('src' => $avatarUrl,
'class' => 'photo avatar entity_depiction',
'width' => AVATAR_PROFILE_SIZE,
'height' => AVATAR_PROFILE_SIZE,
'class' => 'entity_nickname nickname'),
$this->profile->nickname);
if ($this->profile->fullname) {
- $this->element('div', 'fn entity_fn', $this->profile->fullname);
+ $this->element('div', 'p-name entity_fn', $this->profile->fullname);
}
if ($this->profile->location) {
if ($this->profile->homepage) {
$this->element('a', array('href' => $this->profile->homepage,
'rel' => 'me',
- 'class' => 'url entity_url'),
+ 'class' => 'u-url entity_url'),
$this->profile->homepage);
}
}
$this->elementEnd('body');
- $this->elementEnd('html');
+ $this->endHTML();
} else {
// TRANS: Success message if lists are saved.
$this->error = _('Lists saved.');