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. --- plugins/Mapstraction/allmap.php | 7 +------ plugins/Mapstraction/usermap.php | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) (limited to 'plugins') diff --git a/plugins/Mapstraction/allmap.php b/plugins/Mapstraction/allmap.php index 6e2e1d122..62d8d0445 100644 --- a/plugins/Mapstraction/allmap.php +++ b/plugins/Mapstraction/allmap.php @@ -61,12 +61,7 @@ class AllmapAction extends MapAction function title() { - if (!empty($this->profile->fullname)) { - // @todo FIXME: Bad i18n. Should be "%1$s (%2$s)". - $base = $this->profile->fullname . ' (' . $this->user->nickname . ') '; - } else { - $base = $this->user->nickname; - } + $base = $this->profile->getFancyName(); if ($this->page == 1) { // TRANS: Page title. diff --git a/plugins/Mapstraction/usermap.php b/plugins/Mapstraction/usermap.php index 0ee956159..54412146e 100644 --- a/plugins/Mapstraction/usermap.php +++ b/plugins/Mapstraction/usermap.php @@ -58,12 +58,7 @@ class UsermapAction extends MapAction function title() { - if (!empty($this->profile->fullname)) { - // @todo FIXME: Bad i18n. Should be '%1$s (%2$s)' - $base = $this->profile->fullname . ' (' . $this->user->nickname . ')'; - } else { - $base = $this->user->nickname; - } + $base = $this->profile->getFancyName(); if ($this->page == 1) { // @todo CHECKME: inconsisten with paged variant below. " map" missing. -- cgit v1.2.3-54-g00ecf