Commit 5eb8a44f authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Fix the watched group/institution page errors (Bug #1099811)"

parents 72f292ce b4d567f2
......@@ -55,7 +55,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"';
......
......@@ -869,7 +869,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
......@@ -926,8 +926,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() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment