includes/api/ApiQueryAllDeletedRevisions.php 1 location
|
@@ 230-244 (lines=15) @@
|
| 227 |
|
$db->addQuotes( $params['excludeuser'] ) ); |
| 228 |
|
} |
| 229 |
|
|
| 230 |
|
if ( !is_null( $params['user'] ) || !is_null( $params['excludeuser'] ) ) { |
| 231 |
|
// Paranoia: avoid brute force searches (bug 17342) |
| 232 |
|
// (shouldn't be able to get here without 'deletedhistory', but |
| 233 |
|
// check it again just in case) |
| 234 |
|
if ( !$user->isAllowed( 'deletedhistory' ) ) { |
| 235 |
|
$bitmask = Revision::DELETED_USER; |
| 236 |
|
} elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { |
| 237 |
|
$bitmask = Revision::DELETED_USER | Revision::DELETED_RESTRICTED; |
| 238 |
|
} else { |
| 239 |
|
$bitmask = 0; |
| 240 |
|
} |
| 241 |
|
if ( $bitmask ) { |
| 242 |
|
$this->addWhere( $db->bitAnd( 'ar_deleted', $bitmask ) . " != $bitmask" ); |
| 243 |
|
} |
| 244 |
|
} |
| 245 |
|
|
| 246 |
|
if ( !is_null( $params['continue'] ) ) { |
| 247 |
|
$cont = explode( '|', $params['continue'] ); |
includes/api/ApiQueryDeletedRevisions.php 1 location
|
@@ 137-151 (lines=15) @@
|
| 134 |
|
$db->addQuotes( $params['excludeuser'] ) ); |
| 135 |
|
} |
| 136 |
|
|
| 137 |
|
if ( !is_null( $params['user'] ) || !is_null( $params['excludeuser'] ) ) { |
| 138 |
|
// Paranoia: avoid brute force searches (bug 17342) |
| 139 |
|
// (shouldn't be able to get here without 'deletedhistory', but |
| 140 |
|
// check it again just in case) |
| 141 |
|
if ( !$user->isAllowed( 'deletedhistory' ) ) { |
| 142 |
|
$bitmask = Revision::DELETED_USER; |
| 143 |
|
} elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { |
| 144 |
|
$bitmask = Revision::DELETED_USER | Revision::DELETED_RESTRICTED; |
| 145 |
|
} else { |
| 146 |
|
$bitmask = 0; |
| 147 |
|
} |
| 148 |
|
if ( $bitmask ) { |
| 149 |
|
$this->addWhere( $db->bitAnd( 'ar_deleted', $bitmask ) . " != $bitmask" ); |
| 150 |
|
} |
| 151 |
|
} |
| 152 |
|
|
| 153 |
|
if ( !is_null( $params['continue'] ) ) { |
| 154 |
|
$cont = explode( '|', $params['continue'] ); |
includes/api/ApiQueryDeletedrevs.php 1 location
|
@@ 222-236 (lines=15) @@
|
| 219 |
|
$db->addQuotes( $params['excludeuser'] ) ); |
| 220 |
|
} |
| 221 |
|
|
| 222 |
|
if ( !is_null( $params['user'] ) || !is_null( $params['excludeuser'] ) ) { |
| 223 |
|
// Paranoia: avoid brute force searches (bug 17342) |
| 224 |
|
// (shouldn't be able to get here without 'deletedhistory', but |
| 225 |
|
// check it again just in case) |
| 226 |
|
if ( !$user->isAllowed( 'deletedhistory' ) ) { |
| 227 |
|
$bitmask = Revision::DELETED_USER; |
| 228 |
|
} elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { |
| 229 |
|
$bitmask = Revision::DELETED_USER | Revision::DELETED_RESTRICTED; |
| 230 |
|
} else { |
| 231 |
|
$bitmask = 0; |
| 232 |
|
} |
| 233 |
|
if ( $bitmask ) { |
| 234 |
|
$this->addWhere( $db->bitAnd( 'ar_deleted', $bitmask ) . " != $bitmask" ); |
| 235 |
|
} |
| 236 |
|
} |
| 237 |
|
|
| 238 |
|
if ( !is_null( $params['continue'] ) ) { |
| 239 |
|
$cont = explode( '|', $params['continue'] ); |
includes/api/ApiQueryRecentChanges.php 1 location
|
@@ 334-345 (lines=12) @@
|
| 331 |
|
} |
| 332 |
|
|
| 333 |
|
// Paranoia: avoid brute force searches (bug 17342) |
| 334 |
|
if ( !is_null( $params['user'] ) || !is_null( $params['excludeuser'] ) ) { |
| 335 |
|
if ( !$user->isAllowed( 'deletedhistory' ) ) { |
| 336 |
|
$bitmask = Revision::DELETED_USER; |
| 337 |
|
} elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { |
| 338 |
|
$bitmask = Revision::DELETED_USER | Revision::DELETED_RESTRICTED; |
| 339 |
|
} else { |
| 340 |
|
$bitmask = 0; |
| 341 |
|
} |
| 342 |
|
if ( $bitmask ) { |
| 343 |
|
$this->addWhere( $this->getDB()->bitAnd( 'rc_deleted', $bitmask ) . " != $bitmask" ); |
| 344 |
|
} |
| 345 |
|
} |
| 346 |
|
if ( $this->getRequest()->getCheck( 'namespace' ) ) { |
| 347 |
|
// LogPage::DELETED_ACTION hides the affected page, too. |
| 348 |
|
if ( !$user->isAllowed( 'deletedhistory' ) ) { |
includes/api/ApiQueryWatchlist.php 1 location
|
@@ 227-238 (lines=12) @@
|
| 224 |
|
); |
| 225 |
|
|
| 226 |
|
// Paranoia: avoid brute force searches (bug 17342) |
| 227 |
|
if ( !is_null( $params['user'] ) || !is_null( $params['excludeuser'] ) ) { |
| 228 |
|
if ( !$user->isAllowed( 'deletedhistory' ) ) { |
| 229 |
|
$bitmask = Revision::DELETED_USER; |
| 230 |
|
} elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { |
| 231 |
|
$bitmask = Revision::DELETED_USER | Revision::DELETED_RESTRICTED; |
| 232 |
|
} else { |
| 233 |
|
$bitmask = 0; |
| 234 |
|
} |
| 235 |
|
if ( $bitmask ) { |
| 236 |
|
$this->addWhere( $this->getDB()->bitAnd( 'rc_deleted', $bitmask ) . " != $bitmask" ); |
| 237 |
|
} |
| 238 |
|
} |
| 239 |
|
|
| 240 |
|
// LogPage::DELETED_ACTION hides the affected page, too. So hide those |
| 241 |
|
// entirely from the watchlist, or someone could guess the title. |