Fix fatal error

Fatal error: Call to undefined method WikiPage::getContext()

Change-Id: Ib7c7f5cd529930cd469ecce7e66fcc810e7549aa
This commit is contained in:
bsitu 2012-12-05 17:29:22 -08:00
parent bc669eed8a
commit efe5f6817f

View file

@ -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;