* @return bool
*/
public function showPatrolFooter() {
- global $wgUseNPPatrol, $wgEnableAPI, $wgEnableWriteAPI;
+ global $wgUseNPPatrol, $wgUseRCPatrol, $wgEnableAPI, $wgEnableWriteAPI;
$outputPage = $this->getContext()->getOutput();
$user = $this->getContext()->getUser();
$cache = wfGetMainCache();
$rc = false;
- if ( !$this->getTitle()->quickUserCan( 'patrol', $user ) || !$wgUseNPPatrol ) {
+ if ( !$this->getTitle()->quickUserCan( 'patrol', $user ) || !( $wgUseRCPatrol || $wgUseNPPatrol ) ) {
// Patrolling is disabled or the user isn't allowed to
return false;
}
$this->doDelete( $reason, $suppress );
- if ( $user->isLoggedIn() && $request->getCheck( 'wpWatch' ) != $user->isWatched( $title ) ) {
- if ( $request->getCheck( 'wpWatch' ) ) {
- WatchAction::doWatch( $title, $user );
- } else {
- WatchAction::doUnwatch( $title, $user );
- }
- }
+ WatchAction::doWatchOrUnwatch( $request->getCheck( 'wpWatch' ), $title, $user );
return;
}