|| ( isset( $show['anon'] ) && isset( $show['!anon'] ) )
|| ( isset( $show['redirect'] ) && isset( $show['!redirect'] ) )
|| ( isset( $show['patrolled'] ) && isset( $show['!patrolled'] ) )
+ || ( isset( $show['patrolled'] ) && isset( $show['unpatrolled'] ) )
+ || ( isset( $show['!patrolled'] ) && isset( $show['unpatrolled'] ) )
) {
$this->dieUsageMsg( 'show' );
}
// Check permissions
- if ( isset( $show['patrolled'] ) || isset( $show['!patrolled'] ) ) {
+ if ( isset( $show['patrolled'] ) || isset( $show['!patrolled'] ) || isset( $show['unpatrolled'] ) ) {
if ( !$user->useRCPatrol() && !$user->useNPPatrol() ) {
$this->dieUsage(
'You need the patrol right to request the patrolled flag',
$this->addWhereIf( 'rc_patrolled != 0', isset( $show['patrolled'] ) );
$this->addWhereIf( 'page_is_redirect = 1', isset( $show['redirect'] ) );
+ if ( isset( $show['unpatrolled'] ) ) {
+ // See ChangesList:isUnpatrolled
+ if ( $user->useRCPatrol() ) {
+ $this->addWhere( 'rc_patrolled = 0' );
+ } elseif ( $user->useNPPatrol() ) {
+ $this->addWhere( 'rc_patrolled = 0' );
+ $this->addWhereFld( 'rc_type', RC_NEW );
+ }
+ }
+
// Don't throw log entries out the window here
$this->addWhereIf(
'page_is_redirect = 0 OR page_is_redirect IS NULL',
'redirect',
'!redirect',
'patrolled',
- '!patrolled'
+ '!patrolled',
+ 'unpatrolled'
)
),
'limit' => array(