X-Git-Url: http://git.cyclocoop.org//%27http:/ie7-js.googlecode.com/svn/test/index.html/%27?a=blobdiff_plain;f=includes%2Fchanges%2FChangesList.php;h=c0822c3438c232dd09b7e1fa78d8c07db7eb59d2;hb=55aab97bb4b507911e24995ae870b78f86c17557;hp=facf29ea8445ffcfa0f853e6f4119dcbec2eb09d;hpb=4e6fd1d5ee479eede69803ad4aa519fde32f879c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index facf29ea84..c0822c3438 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -652,7 +652,8 @@ class ChangesList extends ContextSource { } } - /** Inserts a rollback link + /** + * Insert a rollback link * * @param string &$s * @param RecentChange &$rc @@ -661,15 +662,14 @@ class ChangesList extends ContextSource { if ( $rc->mAttribs['rc_type'] == RC_EDIT && $rc->mAttribs['rc_this_oldid'] && $rc->mAttribs['rc_cur_id'] + && $rc->getAttribute( 'page_latest' ) == $rc->mAttribs['rc_this_oldid'] ) { - $page = $rc->getTitle(); - /** Check for rollback and edit permissions, disallow special pages, and only + $title = $rc->getTitle(); + /** Check for rollback permissions, disallow special pages, and only * show a link on the top-most revision */ - if ( $this->getUser()->isAllowed( 'rollback' ) - && $rc->mAttribs['page_latest'] == $rc->mAttribs['rc_this_oldid'] - ) { + if ( $title->quickUserCan( 'rollback', $this->getUser() ) ) { $rev = new Revision( [ - 'title' => $page, + 'title' => $title, 'id' => $rc->mAttribs['rc_this_oldid'], 'user' => $rc->mAttribs['rc_user'], 'user_text' => $rc->mAttribs['rc_user_text'],