mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 01:30:15 +00:00
Fix fatal error
Fatal error: Call to undefined method WikiPage::getContext() Change-Id: Ib7c7f5cd529930cd469ecce7e66fcc810e7549aa
This commit is contained in:
parent
bc669eed8a
commit
efe5f6817f
|
@ -294,10 +294,10 @@ class EchoHooks {
|
|||
* @return bool
|
||||
*/
|
||||
static function abortNewTalkNotification( $article ) {
|
||||
global $wgEchoEnabledEvents;
|
||||
global $wgEchoEnabledEvents, $wgUser;
|
||||
// If the user has the notifications flyout turned on and is receiving
|
||||
// notifications for talk page messages, disable the yellow-bar-style notice.
|
||||
if ( $article->getContext()->getUser()->getOption( 'echo-notify-link' )
|
||||
if ( $wgUser->getOption( 'echo-notify-link' )
|
||||
&& in_array( 'edit-user-talk', $wgEchoEnabledEvents ) )
|
||||
{
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue