https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113804
Revision: 113804
Author: ialex
Date: 2012-03-14 10:46:59 +0000 (Wed, 14 Mar 2012)
Log Message:
-----------
Be consistent in the interface and use Title::quickUserCan() instead of
Title::userCan() to show items in the interface so that when the user is
blocked or the page is cascade protected there is not a part of the interface
saying you can edit the page and another part not.
Modified Paths:
--------------
trunk/phase3/includes/diff/DifferenceEngine.php
Modified: trunk/phase3/includes/diff/DifferenceEngine.php
===================================================================
--- trunk/phase3/includes/diff/DifferenceEngine.php 2012-03-14 09:52:34 UTC
(rev 113803)
+++ trunk/phase3/includes/diff/DifferenceEngine.php 2012-03-14 10:46:59 UTC
(rev 113804)
@@ -261,7 +261,7 @@
$samePage = false;
}
- if ( $samePage && $this->mNewPage->userCan( 'edit',
$user ) ) {
+ if ( $samePage && $this->mNewPage->quickUserCan(
'edit', $user ) ) {
if ( $this->mNewRev->isCurrent() &&
$this->mNewPage->userCan( 'rollback', $user ) ) {
$out->preventClickjacking();
$rollback = '   ' .
Linker::generateRollback( $this->mNewRev );
@@ -403,7 +403,7 @@
if ( $this->mMarkPatrolledLink === null ) {
// Prepare a change patrol link, if applicable
- if ( $wgUseRCPatrol && $this->mNewPage->userCan(
'patrol', $this->getUser() ) ) {
+ if ( $wgUseRCPatrol && $this->mNewPage->quickUserCan(
'patrol', $this->getUser() ) ) {
// If we've been given an explicit change
identifier, use it; saves time
if ( $this->mRcidMarkPatrolled ) {
$rcid = $this->mRcidMarkPatrolled;
@@ -867,7 +867,7 @@
$editQuery['oldid'] = $rev->getID();
}
- $msg = $this->msg( $title->userCan( 'edit', $user ) ?
'editold' : 'viewsourceold' )->escaped();
+ $msg = $this->msg( $title->quickUserCan( 'edit', $user
) ? 'editold' : 'viewsourceold' )->escaped();
$header .= ' (' . Linker::linkKnown( $title, $msg,
array(), $editQuery ) . ')';
if ( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
$header = Html::rawElement( 'span', array(
'class' => 'history-deleted' ), $header );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs