From 6ee8570c80bb5169bd166f39dc0e40ef154868db Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Fri, 22 Nov 2013 22:20:45 -0800 Subject: [PATCH] Check supposed revision being reverted is on the same page Bug: 57474 Change-Id: Idec054930dd20a01ec9d5132cce25378914629fc --- Hooks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hooks.php b/Hooks.php index 758a1c58f..69faf27d9 100644 --- a/Hooks.php +++ b/Hooks.php @@ -462,7 +462,7 @@ class EchoHooks { $undidRevId = $wgRequest->getVal( 'wpUndidRevision' ); if ( $undidRevId ) { $undidRevision = Revision::newFromId( $undidRevId ); - if ( $undidRevision ) { + if ( $undidRevision && $undidRevision->getTitle()->equals( $title ) ) { $victimId = $undidRevision->getUser(); if ( $victimId ) { // No notifications for anonymous users EchoEvent::create( array(