]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix #81: Profile and personal shows „you“ instead of username when looking at own...
authorAdrian Lang <mail@adrianlang.de>
Mon, 2 Feb 2009 00:43:41 +0000 (01:43 +0100)
committerEvan Prodromou <evan@controlyourself.ca>
Thu, 5 Feb 2009 16:53:32 +0000 (11:53 -0500)
actions/all.php
actions/showstream.php

index 428466f243edb7555b8d12de3a4a99418e114f53..b03ad7ec367af5ac115e9037ef2276d61694b3b1 100644 (file)
@@ -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));
+        }
+    }
+
 }
index 90ffcacf9a7900eb754fa165714d680c2bc70013..4b16799697e31fec7e13dc9f303ddbffa32a2dbe 100644 (file)
@@ -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()