dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Ensure whether user can rollback page in ChangesList"
[lhc/web/wiklou.git]
/
includes
/
changes
/
ChangesList.php
diff --git
a/includes/changes/ChangesList.php
b/includes/changes/ChangesList.php
index
facf29e
..
c0822c3
100644
(file)
--- 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
*
* @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']
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']
) {
) {
- $
pag
e = $rc->getTitle();
- /** Check for rollback
and edit
permissions, disallow special pages, and only
+ $
titl
e = $rc->getTitle();
+ /** Check for rollback permissions, disallow special pages, and only
* show a link on the top-most revision */
* 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( [
$rev = new Revision( [
- 'title' => $
pag
e,
+ 'title' => $
titl
e,
'id' => $rc->mAttribs['rc_this_oldid'],
'user' => $rc->mAttribs['rc_user'],
'user_text' => $rc->mAttribs['rc_user_text'],
'id' => $rc->mAttribs['rc_this_oldid'],
'user' => $rc->mAttribs['rc_user'],
'user_text' => $rc->mAttribs['rc_user_text'],