$this->getDateCond( $year, $month );
$this->mTagFilter = $tagFilter;
- $this->mDb = wfGetDB( DB_SLAVE, 'logpager' );
+ $this->mDb = wfGetDB( DB_REPLICA, 'logpager' );
}
public function getDefaultQuery() {
if ( is_null( $usertitle ) ) {
return;
}
+ // Normalize username first so that non-existent users used
+ // in maintenance scripts work
+ $name = $usertitle->getText();
/* Fetch userid at first, if known, provides awesome query plan afterwards */
$userid = User::idFromName( $name );
if ( !$userid ) {
} else {
$this->mConds['log_user'] = $userid;
}
- // Paranoia: avoid brute force searches (bug 17342)
+ // Paranoia: avoid brute force searches (T19342)
$user = $this->getUser();
if ( !$user->isAllowed( 'deletedhistory' ) ) {
$this->mConds[] = $this->mDb->bitAnd( 'log_deleted', LogPage::DELETED_USER ) . ' = 0';
' != ' . LogPage::SUPPRESSED_USER;
}
- $this->performer = $usertitle->getText();
+ $this->performer = $name;
}
/**
} else {
$this->mConds['log_title'] = $title->getDBkey();
}
- // Paranoia: avoid brute force searches (bug 17342)
+ // Paranoia: avoid brute force searches (T19342)
$user = $this->getUser();
if ( !$user->isAllowed( 'deletedhistory' ) ) {
$this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::DELETED_ACTION ) . ' = 0';