From: Jens Frank Date: Mon, 9 Aug 2004 18:58:43 +0000 (+0000) Subject: Make RC patroling an optional feature that can be turned off by setting wgUseRCPatrol... X-Git-Tag: 1.5.0alpha1~2447 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=ede710c2c2260201eab1fa1e155c7fecd55a29a6;p=lhc%2Fweb%2Fwiklou.git Make RC patroling an optional feature that can be turned off by setting wgUseRCPatrol to false. Enabled by default --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 1faa21cf06..5af479e1b6 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -477,6 +477,9 @@ $wgUseValidation = false; # extensions package) $wgUseExternalDiffEngine = false; +# Use RC Patrolling to check for vandalism +$wgUseRCPatrol = true; + } else { die(); } diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index c2c388467f..be90b6852c 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -19,7 +19,7 @@ class DifferenceEngine { function showDiffPage() { - global $wgUser, $wgTitle, $wgOut, $wgLang, $wgOnlySysopsCanPatrol; + global $wgUser, $wgTitle, $wgOut, $wgLang, $wgOnlySysopsCanPatrol, $wgUseRCPatrol; $fname = "DifferenceEngine::showDiffPage"; wfProfileIn( $fname ); @@ -74,8 +74,9 @@ class DifferenceEngine { } else { $rollback = ""; } - if ( $this->mRcidMarkPatrolled != 0 && $wgUser->getID() != 0 && - ( $wgUser->isSysop() || !$wgOnlySysopsCanPatrol ) ) + if ( $wgUseRCPatrol && + ($this->mRcidMarkPatrolled != 0 && $wgUser->getID() != 0 && + ( $wgUser->isSysop() || !$wgOnlySysopsCanPatrol ) ) ) { $patrol = " [" . $sk->makeKnownLinkObj( $wgTitle, wfMsg( 'markaspatrolleddiff' ), "action=markpatrolled&rcid={$this->mRcidMarkPatrolled}" ) . "]"; diff --git a/includes/Skin.php b/includes/Skin.php index 16750d27af..aa2acdfb2b 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -2250,7 +2250,7 @@ class Skin { function recentChangesLineOld( &$rc, $watched = false ) { - global $wgTitle, $wgLang, $wgUser, $wgRCSeconds; + global $wgTitle, $wgLang, $wgUser, $wgRCSeconds, $wgUseRCPatrol; # Extract DB fields into local scope extract( $rc->mAttribs ); @@ -2267,7 +2267,7 @@ class Skin { } # If this edit has not yet been patrolled, make it stick out - $s .= ( $rc_patrolled ) ? '
  • ' : '
  • '; + $s .= ( ! $wgUseRCPatrol || $rc_patrolled ) ? '
  • ' : '
  • '; if ( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) { # Diff