From c2f7148e5dd7c3c93632783b461ee2804786e92d Mon Sep 17 00:00:00 2001 From: umherirrender Date: Thu, 30 May 2013 07:25:07 +0200 Subject: [PATCH] Show rollback link on changes list only for RC_EDIT Changing from !RC_NEW to RC_EDIT to have no rollback links, when this method is called accidently for RC_LOG or RC_EXTERNAL (or for the old RC_MOVE/RC_MOVE_OVER_REDIRECT). For that types there are 0 revisions to rollback. Change-Id: I1cbdc87a8b8e0cecf6fbfa3b3a64d5015057bccf --- includes/ChangesList.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/ChangesList.php b/includes/ChangesList.php index b1bb82eaca..e0f522ae72 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -532,7 +532,7 @@ class ChangesList extends ContextSource { * @param $rc RecentChange */ public function insertRollback( &$s, &$rc ) { - if ( $rc->mAttribs['rc_type'] != RC_NEW && $rc->mAttribs['rc_this_oldid'] && $rc->mAttribs['rc_cur_id'] ) { + if ( $rc->mAttribs['rc_type'] == RC_EDIT && $rc->mAttribs['rc_this_oldid'] && $rc->mAttribs['rc_cur_id'] ) { $page = $rc->getTitle(); /** Check for rollback and edit permissions, disallow special pages, and only * show a link on the top-most revision */ -- 2.20.1