Index: trunk/phase3/includes/Article.php |
— | — | @@ -1504,21 +1504,23 @@ |
1505 | 1505 | global $wgOut, $wgRequest, $wgOnlySysopsCanPatrol, $wgUseRCPatrol, $wgUser; |
1506 | 1506 | $wgOut->setRobotpolicy( 'noindex,follow' ); |
1507 | 1507 | |
1508 | | - if ( !$wgUseRCPatrol ) |
1509 | | - { |
1510 | | - $wgOut->errorpage( 'rcpatroldisabled', 'rcpatroldisabledtext' ); |
| 1508 | + # Check RC patrol config. option |
| 1509 | + if( !$wgUseRCPatrol ) { |
| 1510 | + $wgOut->errorPage( 'rcpatroldisabled', 'rcpatroldisabledtext' ); |
1511 | 1511 | return; |
1512 | 1512 | } |
1513 | | - if ( $wgUser->isAnon() ) |
1514 | | - { |
| 1513 | + |
| 1514 | + # Check permissions |
| 1515 | + if( $wgUser->isLoggedIn() ) { |
| 1516 | + if( !$wgUser->isAllowed( 'patrol' ) ) { |
| 1517 | + $wgOut->permissionRequired( 'patrol' ); |
| 1518 | + return; |
| 1519 | + } |
| 1520 | + } else { |
1515 | 1521 | $wgOut->loginToUse(); |
1516 | 1522 | return; |
1517 | 1523 | } |
1518 | | - if ( $wgOnlySysopsCanPatrol && !$wgUser->isAllowed('patrol') ) |
1519 | | - { |
1520 | | - $wgOut->sysopRequired(); |
1521 | | - return; |
1522 | | - } |
| 1524 | + |
1523 | 1525 | $rcid = $wgRequest->getVal( 'rcid' ); |
1524 | 1526 | if ( !is_null ( $rcid ) ) |
1525 | 1527 | { |
— | — | @@ -1715,7 +1717,7 @@ |
1716 | 1718 | return; |
1717 | 1719 | } |
1718 | 1720 | } else { |
1719 | | - $wgOut->sysopRequired(); |
| 1721 | + $wgOut->permissionRequired( 'delete' ); |
1720 | 1722 | return; |
1721 | 1723 | } |
1722 | 1724 | |
— | — | @@ -2043,7 +2045,7 @@ |
2044 | 2046 | return; |
2045 | 2047 | } |
2046 | 2048 | } else { |
2047 | | - $wgOut->sysopRequired(); |
| 2049 | + $wgOut->permissionRequired( 'rollback' ); |
2048 | 2050 | return; |
2049 | 2051 | } |
2050 | 2052 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -457,8 +457,8 @@ |
458 | 458 | * Enforce $wgSVGMaxSize when rendering, even for SVGs with a very large source |
459 | 459 | size. This is necessary to limit server memory usage. |
460 | 460 | * Cleanup and error checking on Special:Listredirects |
| 461 | +* Clear up some instances of old OutputPage::sysopRequired() function usage |
461 | 462 | |
462 | | - |
463 | 463 | === Caveats === |
464 | 464 | |
465 | 465 | Some output, particularly involving user-supplied inline HTML, may not |