From: Rob Church Date: Sat, 18 Mar 2006 16:07:17 +0000 (+0000) Subject: * Remove deprecated $wgOnlySysopsCanPatrol references; use User::isAllowed( 'patrol... X-Git-Tag: 1.6.0~191 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=fcd1cdeb930e1779af77b3747b7c60338d4e81d7;p=lhc%2Fweb%2Fwiklou.git * Remove deprecated $wgOnlySysopsCanPatrol references; use User::isAllowed( 'patrol' ) per bug 5282. Patch by Alan Harder. --- 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( "