From 8c8745efd532c47158470b9b68415a2068e9e593 Mon Sep 17 00:00:00 2001 From: Son Nguyen Date: Tue, 17 Dec 2013 09:36:29 +1300 Subject: [PATCH] Fix the watched group/institution page errors (Bug #1099811) Get the correct owner info of a watched view in cases of group or institution pages Change-Id: I144f969a1cbe464892cc20a33fa6336928373278 Signed-off-by: Son Nguyen --- htdocs/lang/en.utf8/activity.php | 2 +- htdocs/lib/activity.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/lang/en.utf8/activity.php b/htdocs/lang/en.utf8/activity.php index 5195c7fbe6..74705d5608 100644 --- a/htdocs/lang/en.utf8/activity.php +++ b/htdocs/lang/en.utf8/activity.php @@ -68,7 +68,7 @@ $string['stopmonitoringsuccess'] = 'Stopped monitoring successfully'; $string['stopmonitoringfailed'] = 'Failed to stop monitoring'; $string['newwatchlistmessage'] = 'New activity on your watchlist'; -$string['newwatchlistmessageview'] = '%s has changed their page "%s"'; +$string['newwatchlistmessageview1'] = 'The page "%s" belonging to %s has been changed'; $string['newviewsubject'] = 'New page created'; $string['newviewmessage'] = '%s has created a new page "%s"'; diff --git a/htdocs/lib/activity.php b/htdocs/lib/activity.php index beb5378246..552ed0fd83 100644 --- a/htdocs/lib/activity.php +++ b/htdocs/lib/activity.php @@ -831,7 +831,7 @@ class ActivityTypeWatchlist extends ActivityType { require_once('view.php'); if ($this->viewinfo = new View($this->view)) { - $this->ownerinfo = $this->viewinfo->get_owner_object(); + $this->ownerinfo = hsc($this->viewinfo->formatted_owner()); } if (empty($this->ownerinfo)) { if (!empty($this->cron)) { // probably deleted already @@ -888,8 +888,8 @@ class ActivityTypeWatchlist extends ActivityType { } public function get_message($user) { - return get_string_from_language($user->lang, 'newwatchlistmessageview', 'activity', - display_name($this->ownerinfo, $user), $this->viewinfo->get('title')); + return get_string_from_language($user->lang, 'newwatchlistmessageview1', 'activity', + $this->viewinfo->get('title'), $this->ownerinfo); } public function get_required_parameters() { -- GitLab