From 68a3139d0b86a2a716b24a481e677aa5d4699396 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Mon, 2 Feb 2009 01:43:41 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20#81:=20Profile=20and=20personal=20shows?= =?UTF-8?q?=20=E2=80=9Eyou=E2=80=9C=20instead=20of=20username=20when=20loo?= =?UTF-8?q?king=20at=20own=20profile=20/=20personal.=20While=20doing=20so?= =?UTF-8?q?=20I=20fixed=20a=20wrong=20gettext=20usage=20were=20the=20resul?= =?UTF-8?q?t=20was=20not=20sprintf'd,=20but=20concat'd.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- actions/all.php | 11 +++++++++++ actions/showstream.php | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/actions/all.php b/actions/all.php index 428466f243..b03ad7ec36 100644 --- a/actions/all.php +++ b/actions/all.php @@ -101,4 +101,15 @@ class AllAction extends Action $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, 'all', array('nickname' => $this->user->nickname)); } + + function showPageTitle() + { + $user =& common_current_user(); + if ($user && ($user->id == $this->user->id)) { + $this->element('h1', NULL, _("You and friends")); + } else { + $this->element('h1', NULL, sprintf(_('%s and friends'), $this->user->nickname)); + } + } + } diff --git a/actions/showstream.php b/actions/showstream.php index 90ffcacf9a..4b16799697 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -140,7 +140,12 @@ class ShowstreamAction extends Action function showPageTitle() { - $this->element('h1', NULL, $this->profile->nickname._("'s profile")); + $user =& common_current_user(); + if ($user && ($user->id == $this->profile->id)) { + $this->element('h1', NULL, _("Your profile")); + } else { + $this->element('h1', NULL, sprintf(_('%s\'s profile'), $this->profile->nickname)); + } } function showPageNoticeBlock()