From fcd1cdeb930e1779af77b3747b7c60338d4e81d7 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sat, 18 Mar 2006 16:07:17 +0000 Subject: [PATCH] * Remove deprecated $wgOnlySysopsCanPatrol references; use User::isAllowed( 'patrol' ) per bug 5282. Patch by Alan Harder. --- RELEASE-NOTES | 2 ++ includes/Article.php | 30 +++++++++--------------------- includes/ChangesList.php | 7 +++---- includes/DifferenceEngine.php | 10 +++------- includes/SpecialNewpages.php | 16 ++++++---------- 5 files changed, 23 insertions(+), 42 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 0d9e3d60d9..350ca5d852 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -322,6 +322,8 @@ Security: * Blocked users can no longer roll back, change the protection of, or delete/undelete pages * Protect against spoofing of X-Forwarded-For header * XSS issue : now sanitize search query input (fixed in 1.5rc3) +* Remove deprecated $wgOnlySysopsCanPatrol references; use User::isAllowed( 'patrol' ) + per bug 5282. Patch by Alan Harder. Special Pages: * Rearranged Special:Movepage form to reduce confusion between destination diff --git a/includes/Article.php b/includes/Article.php index f39ae2e7d7..ad11b2f0d9 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -727,7 +727,7 @@ class Article { * 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(); @@ -920,12 +920,7 @@ class Article { # If we have been passed an &rcid= parameter, we want to give the user a # chance to mark this new article as patrolled. - if ( $wgUseRCPatrol - && !is_null($rcid) - && $rcid != 0 - && $wgUser->isLoggedIn() - && ( $wgUser->isAllowed('patrol') || !$wgOnlySysopsCanPatrol ) ) - { + if ( $wgUseRCPatrol && !is_null( $rcid ) && $rcid != 0 && $wgUser->isAllowed( 'patrol' ) ) { $wgOut->addHTML( "