* @file
*/
+use MediaWiki\MediaWikiServices;
+
/**
* @ingroup Pager
*/
$params[] = $db->anyString();
}
array_pop( $params ); // Get rid of the last % we added.
- $this->mConds[] = 'log_title' . $db->buildLike( $params );
+ $this->mConds[] = 'log_title' . $db->buildLike( ...$params );
} elseif ( $pattern && !$wgMiserMode ) {
$this->mConds[] = 'log_title' . $db->buildLike( $title->getDBkey(), $db->anyString() );
$this->pattern = $pattern;
$user = $this->getUser();
if ( !$user->isAllowed( 'deletedhistory' ) ) {
$this->mConds[] = $this->mDb->bitAnd( 'log_deleted', LogPage::DELETED_ACTION ) . ' = 0';
- } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
+ } elseif ( !MediaWikiServices::getInstance()
+ ->getPermissionManager()
+ ->userHasAnyRight( $user, 'suppressrevision', 'viewsuppressed' )
+ ) {
$this->mConds[] = $this->mDb->bitAnd( 'log_deleted', LogPage::SUPPRESSED_ACTION ) .
' != ' . LogPage::SUPPRESSED_USER;
}
$user = $this->getUser();
if ( !$user->isAllowed( 'deletedhistory' ) ) {
$this->mConds[] = $this->mDb->bitAnd( 'log_deleted', LogPage::DELETED_USER ) . ' = 0';
- } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
+ } elseif ( !MediaWikiServices::getInstance()
+ ->getPermissionManager()
+ ->userHasAnyRight( $user, 'suppressrevision', 'viewsuppressed' )
+ ) {
$this->mConds[] = $this->mDb->bitAnd( 'log_deleted', LogPage::SUPPRESSED_USER ) .
' != ' . LogPage::SUPPRESSED_ACTION;
}