return false;
}
- $this->user = User::staticGet('id', $this->profile->id);
+ $this->user = User::getKV('id', $this->profile->id);
- $this->avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE);
+ try {
+ $this->avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE);
+ } catch (Exception $e) {
+ $this->avatar = null;
+ }
return true;
}
{
$id = $this->arg('notice');
- $notice = Notice::staticGet('id', $id);
+ $notice = Notice::getKV('id', $id);
if (empty($notice)) {
// Did we used to have it, and it got deleted?
- $deleted = Deleted_notice::staticGet($id);
+ $deleted = Deleted_notice::getKV($id);
if (!empty($deleted)) {
// TRANS: Client error displayed trying to show a deleted notice.
$this->clientError(_('Notice deleted.'), 410);
function showAjax()
{
- header('Content-Type: text/xml;charset=utf-8');
- $this->xw->startDocument('1.0', 'UTF-8');
- $this->elementStart('html');
+ $this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head');
// TRANS: Title for page that shows a notice.
$this->element('title', null, _m('TITLE','Notice'));
$nli = new NoticeListItem($this->notice, $this);
$nli->show();
$this->elementEnd('body');
- $this->elementEnd('html');
+ $this->endHTML();
}
/**
*/
function extraHead()
{
- $user = User::staticGet($this->profile->id);
+ $user = User::getKV($this->profile->id);
if (!$user) {
return;
'title'=>'oEmbed'),null);
// Extras to aid in sharing notices to Facebook
- $avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE);
- $avatarUrl = ($avatar) ?
- $avatar->displayUrl() :
- Avatar::defaultImage(AVATAR_PROFILE_SIZE);
+ $avatarUrl = $this->profile->avatarUrl(AVATAR_PROFILE_SIZE);
$this->element('meta', array('property' => 'og:image',
'content' => $avatarUrl));
$this->element('meta', array('property' => 'og:description',