Commit 10267404 authored by Robert Lyon's avatar Robert Lyon Committed by Cecilia Vela Gurovic

Bug 1794370: Use correct owner for watchlist message

When sending watchlist notification for block changes in a view

behatnotneeded

Change-Id: Ieeb89c6662acabd8438486702e10433ea6feab70
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
(cherry picked from commit 0866ac93)
(cherry picked from commit d67773e5)
parent 00475c2a
......@@ -1209,8 +1209,8 @@ class ActivityTypeWatchlist extends ActivityType {
protected $view;
private $ownerinfo;
private $viewinfo;
protected $ownerinfo;
protected $viewinfo;
/**
* @param array $data Parameters:
......@@ -1292,7 +1292,6 @@ class ActivityTypeWatchlist extends ActivityType {
*/
class ActivityTypeWatchlistnotification extends ActivityTypeWatchlist{
protected $view;
protected $viewinfo;
protected $blocktitles = array();
protected $usr;
......@@ -1307,9 +1306,6 @@ class ActivityTypeWatchlistnotification extends ActivityTypeWatchlist{
$this->blocktitles = $data->blocktitles;
$this->usr = $data->usr;
$this->viewinfo = new View($this->view);
}
/**
......@@ -1321,7 +1317,7 @@ class ActivityTypeWatchlistnotification extends ActivityTypeWatchlist{
*/
public function get_message($user) {
$message = get_string_from_language($user->lang, 'newwatchlistmessageview1', 'activity',
$this->viewinfo->get('title'), display_name($this->usr, $user));
$this->viewinfo->get('title'), $this->ownerinfo);
try {
foreach ($this->blocktitles as $blocktitle) {
......
Markdown is supported
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