From 6e034567539d12c17759577f5392e86c3aca2fa6 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 3 Nov 2010 13:10:42 -0700 Subject: Migrate some more code from manually constructing "fullname (nickname)" to using Profile->getFancyName(). Encapsulates common logic and allows for localization of the parens. --- actions/oembed.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'actions/oembed.php') diff --git a/actions/oembed.php b/actions/oembed.php index e25e4cb25..da3aa0c71 100644 --- a/actions/oembed.php +++ b/actions/oembed.php @@ -79,11 +79,7 @@ class OembedAction extends Action if (empty($profile)) { $this->serverError(_('Notice has no profile.'), 500); } - if (!empty($profile->fullname)) { - $authorname = $profile->fullname . ' (' . $profile->nickname . ')'; - } else { - $authorname = $profile->nickname; - } + $authorname = $profile->getFancyName(); $oembed['title'] = sprintf(_('%1$s\'s status on %2$s'), $authorname, common_exact_date($notice->created)); -- cgit v1.2.3-54-g00ecf