Commit 0866ac93 authored by Robert Lyon's avatar Robert Lyon
Browse files

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: default avatarRobert Lyon <robertl@catalyst.net.nz>
parent a9e89149
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -1250,8 +1250,8 @@ class ActivityTypeWatchlist extends ActivityType {

    protected $view;

    private $ownerinfo;
    private $viewinfo;
    protected $ownerinfo;
    protected $viewinfo;

    /**
     * @param array $data Parameters:
@@ -1333,7 +1333,6 @@ class ActivityTypeWatchlist extends ActivityType {
 */
class ActivityTypeWatchlistnotification extends ActivityTypeWatchlist{
    protected $view;
    protected $viewinfo;
    protected $blocktitles = array();
    protected $usr;

@@ -1350,7 +1349,6 @@ class ActivityTypeWatchlistnotification extends ActivityTypeWatchlist{
        $this->usr = $data->usr;
        $this->unsubscribelink = get_config('wwwroot') . 'view/unsubscribe.php?a=watchlist&t=';
        $this->unsubscribetype = 'watchlist';
        $this->viewinfo = new View($this->view);
    }

    /**
@@ -1362,7 +1360,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) {