use MediaWiki\Linker\LinkTarget;
use Wikimedia\Assert\Assert;
+use Wikimedia\Rdbms\LoadBalancer;
/**
* Class performing complex database queries related to WatchedItems.
if ( !isset( $options['start'] ) && !isset( $options['end'] ) ) {
if ( $db->getType() === 'mysql' ) {
// This is an index optimization for mysql
- $conds[] = "rc_timestamp > ''";
+ $conds[] = 'rc_timestamp > ' . $db->addQuotes( '' );
}
}
}
private function getStartEndConds( IDatabase $db, array $options ) {
- if ( !isset( $options['start'] ) && ! isset( $options['end'] ) ) {
+ if ( !isset( $options['start'] ) && !isset( $options['end'] ) ) {
return [];
}
$conds[] = 'rc_user_text != ' . $db->addQuotes( $options['notByUser'] );
}
- // Avoid brute force searches (bug 17342)
+ // Avoid brute force searches (T19342)
$bitmask = 0;
if ( !$user->isAllowed( 'deletedhistory' ) ) {
$bitmask = Revision::DELETED_USER;