diff --git a/includes/api/ApiQueryAbuseLog.php b/includes/api/ApiQueryAbuseLog.php index 1a18832e7..a44cee0c4 100644 --- a/includes/api/ApiQueryAbuseLog.php +++ b/includes/api/ApiQueryAbuseLog.php @@ -97,11 +97,12 @@ class ApiQueryAbuseLog extends ApiQueryBase { $this->addFieldsIf( 'afl_actions', $fld_result ); $this->addFieldsIf( 'afl_wiki', $fld_wiki ); + $db = $this->getDB(); if ( $fld_filter ) { $this->addTables( 'abuse_filter' ); $this->addFields( 'af_public_comments' ); $this->addJoinConds( [ 'abuse_filter' => [ 'LEFT JOIN', - 'af_id=afl_filter' ] ] ); + $db->buildStringCast( 'af_id' ) . '=afl_filter' ] ] ); } $this->addOption( 'LIMIT', $params['limit'] + 1 ); diff --git a/includes/pagers/AbuseLogPager.php b/includes/pagers/AbuseLogPager.php index 5e73feb2b..068fffcc2 100644 --- a/includes/pagers/AbuseLogPager.php +++ b/includes/pagers/AbuseLogPager.php @@ -45,7 +45,7 @@ class AbuseLogPager extends ReverseChronologicalPager { [ 'abuse_filter' => [ 'LEFT JOIN', - 'af_id=afl_filter', + $this->mDb->buildStringCast( 'af_id' ) . '=afl_filter', ], ], ]; diff --git a/includes/special/SpecialAbuseLog.php b/includes/special/SpecialAbuseLog.php index ac0bfdb96..33f6254ed 100644 --- a/includes/special/SpecialAbuseLog.php +++ b/includes/special/SpecialAbuseLog.php @@ -320,7 +320,7 @@ class SpecialAbuseLog extends SpecialPage { [ 'afl_id' => $id ], __METHOD__, [], - [ 'abuse_filter' => [ 'LEFT JOIN', 'af_id=afl_filter' ] ] + [ 'abuse_filter' => [ 'LEFT JOIN', $dbr->buildStringCast( 'af_id' ) . '=afl_filter' ] ] ); if ( !$row ) { @@ -572,7 +572,7 @@ class SpecialAbuseLog extends SpecialPage { [ 'afl_id' => $id ], __METHOD__, [], - [ 'abuse_filter' => [ 'LEFT JOIN', 'af_id=afl_filter' ] ] + [ 'abuse_filter' => [ 'LEFT JOIN', $dbr->buildStringCast( 'af_id' ) . '=afl_filter' ] ] ); $error = null; @@ -707,7 +707,7 @@ class SpecialAbuseLog extends SpecialPage { [ 'afl_id' => $id ], __METHOD__, [], - [ 'abuse_filter' => [ 'LEFT JOIN', 'af_id=afl_filter' ] ] + [ 'abuse_filter' => [ 'LEFT JOIN', $dbr->buildStringCast( 'af_id' ) . '=afl_filter' ] ] ); $error = null;