Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2700
MwPatrolRightsPatch.txt
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 9:10 PM
2014-11-21 21:10:33 (UTC+0)
Size
5 KB
Referenced Files
None
Subscribers
None
MwPatrolRightsPatch.txt
View Options
Index: includes/Article.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/Article.php,v
retrieving revision 1.462
diff -u -r1.462 Article.php
--- includes/Article.php 12 Mar 2006 14:34:58 -0000 1.462
+++ includes/Article.php 18 Mar 2006 02:11:33 -0000
@@ -702,7 +702,7 @@
* the given title.
*/
function view() {
- global $wgUser, $wgOut, $wgRequest, $wgOnlySysopsCanPatrol, $wgContLang;
+ global $wgUser, $wgOut, $wgRequest, $wgContLang;
global $wgEnableParserCache, $wgStylePath, $wgUseRCPatrol, $wgParser;
global $wgUseTrackbacks;
$sk = $wgUser->getSkin();
@@ -887,8 +887,7 @@
if ( $wgUseRCPatrol
&& !is_null($rcid)
&& $rcid != 0
- && $wgUser->isLoggedIn()
- && ( $wgUser->isAllowed('patrol') || !$wgOnlySysopsCanPatrol ) )
+ && $wgUser->isAllowed('patrol') )
{
$wgOut->addHTML(
"<div class='patrollink'>" .
@@ -1486,7 +1485,7 @@
* Mark this particular edit as patrolled
*/
function markpatrolled() {
- global $wgOut, $wgRequest, $wgOnlySysopsCanPatrol, $wgUseRCPatrol, $wgUser;
+ global $wgOut, $wgRequest, $wgUseRCPatrol, $wgUser;
$wgOut->setRobotpolicy( 'noindex,follow' );
# Check RC patrol config. option
@@ -1496,23 +1495,18 @@
}
# Check permissions
- if( $wgUser->isLoggedIn() ) {
- if( !$wgUser->isAllowed( 'patrol' ) ) {
- $wgOut->permissionRequired( 'patrol' );
- return;
- }
- } else {
- $wgOut->loginToUse();
+ if( !$wgUser->isAllowed( 'patrol' ) ) {
+ $wgOut->permissionRequired( 'patrol' );
return;
}
$rcid = $wgRequest->getVal( 'rcid' );
if ( !is_null ( $rcid ) )
{
- if( wfRunHooks( 'MarkPatrolled', array( &$rcid, &$wgUser, $wgOnlySysopsCanPatrol ) ) ) {
+ if( wfRunHooks( 'MarkPatrolled', array( &$rcid, &$wgUser, false ) ) ) {
require_once( 'RecentChange.php' );
RecentChange::markPatrolled( $rcid );
- wfRunHooks( 'MarkPatrolledComplete', array( &$rcid, &$wgUser, $wgOnlySysopsCanPatrol ) );
+ wfRunHooks( 'MarkPatrolledComplete', array( &$rcid, &$wgUser, false ) );
$wgOut->setPagetitle( wfMsg( 'markedaspatrolled' ) );
$wgOut->addWikiText( wfMsg( 'markedaspatrolledtext' ) );
}
Index: includes/ChangesList.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/ChangesList.php,v
retrieving revision 1.41
diff -u -r1.41 ChangesList.php
--- includes/ChangesList.php 7 Mar 2006 01:10:38 -0000 1.41
+++ includes/ChangesList.php 18 Mar 2006 02:11:33 -0000
@@ -198,9 +198,8 @@
* @return bool
*/
function usePatrol() {
- global $wgUseRCPatrol, $wgOnlySysopsCanPatrol, $wgUser;
- return $wgUseRCPatrol && $wgUser->isLoggedIn() &&
- ( !$wgOnlySysopsCanPatrol || $wgUser->isAllowed( 'patrol' ) );
+ global $wgUseRCPatrol, $wgUser;
+ return $wgUseRCPatrol && $wgUser->isAllowed( 'patrol' );
}
/**
Index: includes/DifferenceEngine.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/DifferenceEngine.php,v
retrieving revision 1.91
diff -u -r1.91 DifferenceEngine.php
--- includes/DifferenceEngine.php 11 Mar 2006 17:13:49 -0000 1.91
+++ includes/DifferenceEngine.php 18 Mar 2006 02:11:33 -0000
@@ -72,7 +72,7 @@
}
function showDiffPage() {
- global $wgUser, $wgOut, $wgContLang, $wgOnlySysopsCanPatrol;
+ global $wgUser, $wgOut, $wgContLang;
global $wgUseExternalEditor, $wgUseRCPatrol;
$fname = 'DifferenceEngine::showDiffPage';
wfProfileIn( $fname );
@@ -173,7 +173,7 @@
$rollback = '';
}
if ( $wgUseRCPatrol && $this->mRcidMarkPatrolled != 0 && $wgUser->isLoggedIn() &&
- ( $wgUser->isAllowed('rollback') || !$wgOnlySysopsCanPatrol ) )
+ $wgUser->isAllowed('patrol') )
{
$patrol = ' [' . $sk->makeKnownLinkObj( $this->mTitle, wfMsg( 'markaspatrolleddiff' ),
"action=markpatrolled&rcid={$this->mRcidMarkPatrolled}" ) . ']';
Index: includes/SpecialNewpages.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/SpecialNewpages.php,v
retrieving revision 1.42
diff -u -r1.42 SpecialNewpages.php
--- includes/SpecialNewpages.php 7 Mar 2006 01:10:39 -0000 1.42
+++ includes/SpecialNewpages.php 18 Mar 2006 02:11:33 -0000
@@ -32,9 +32,8 @@
}
function getSQL() {
- global $wgUser, $wgOnlySysopsCanPatrol, $wgUseRCPatrol;
- $usepatrol = ( $wgUseRCPatrol && $wgUser->isLoggedIn() &&
- ( $wgUser->isAllowed('patrol') || !$wgOnlySysopsCanPatrol ) ) ? 1 : 0;
+ global $wgUser, $wgUseRCPatrol;
+ $usepatrol = ( $wgUseRCPatrol && $wgUser->isAllowed('patrol') ) ? 1 : 0;
$dbr =& wfGetDB( DB_SLAVE );
extract( $dbr->tableNames( 'recentchanges', 'page', 'text' ) );
@@ -60,7 +59,7 @@
}
function formatResult( $skin, $result ) {
- global $wgLang, $wgContLang, $wgUser, $wgOnlySysopsCanPatrol, $wgUseRCPatrol;
+ global $wgLang, $wgContLang, $wgUser, $wgUseRCPatrol;
$u = $result->user;
$ut = $result->user_text;
@@ -81,8 +80,7 @@
# mark the article as patrolled if it isn't already
$ns = $wgContLang->getNsText( $result->namespace );
if ( $wgUseRCPatrol && !is_null ( $result->usepatrol ) && $result->usepatrol &&
- $result->patrolled == 0 && $wgUser->isLoggedIn() &&
- ( $wgUser->isAllowed('patrol') || !$wgOnlySysopsCanPatrol ) )
+ $result->patrolled == 0 && $wgUser->isAllowed('patrol') )
$link = $skin->makeKnownLink( $ns . ':' . $result->title, '', "rcid={$result->rcid}" );
else
$link = $skin->makeKnownLink( $ns . ':' . $result->title, '' );
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2275
Default Alt Text
MwPatrolRightsPatch.txt (5 KB)
Attached To
Mode
T7282: All logged in users can patrol edits if $wgOnlySysopsCanPatrol is unset/false
Attached
Detach File
Event Timeline
Log In to Comment