Revert "Use string cast for Postgres compatibility"

This reverts commit 4ab12305f1.

Bug: T221357
Change-Id: Id0f26f48ad9904e73a8b65d76586957c2be93e82
This commit is contained in:
Daimona Eaytoy 2019-04-18 11:50:32 +00:00
parent 4ab12305f1
commit 9a315f2a6e
3 changed files with 5 additions and 6 deletions

View file

@ -97,12 +97,11 @@ 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',
$db->buildStringCast( 'af_id' ) . '=afl_filter' ] ] );
'af_id=afl_filter' ] ] );
}
$this->addOption( 'LIMIT', $params['limit'] + 1 );

View file

@ -45,7 +45,7 @@ class AbuseLogPager extends ReverseChronologicalPager {
[ 'abuse_filter' =>
[
'LEFT JOIN',
$this->mDb->buildStringCast( 'af_id' ) . '=afl_filter',
'af_id=afl_filter',
],
],
];

View file

@ -282,7 +282,7 @@ class SpecialAbuseLog extends SpecialPage {
[ 'afl_id' => $id ],
__METHOD__,
[],
[ 'abuse_filter' => [ 'LEFT JOIN', $dbr->buildStringCast( 'af_id' ) . '=afl_filter' ] ]
[ 'abuse_filter' => [ 'LEFT JOIN', 'af_id=afl_filter' ] ]
);
if ( !$row ) {
@ -511,7 +511,7 @@ class SpecialAbuseLog extends SpecialPage {
[ 'afl_id' => $id ],
__METHOD__,
[],
[ 'abuse_filter' => [ 'LEFT JOIN', $dbr->buildStringCast( 'af_id' ) . '=afl_filter' ] ]
[ 'abuse_filter' => [ 'LEFT JOIN', 'af_id=afl_filter' ] ]
);
if ( !$row ) {
@ -649,7 +649,7 @@ class SpecialAbuseLog extends SpecialPage {
[ 'afl_id' => $id ],
__METHOD__,
[],
[ 'abuse_filter' => [ 'LEFT JOIN', $dbr->buildStringCast( 'af_id' ) . '=afl_filter' ] ]
[ 'abuse_filter' => [ 'LEFT JOIN', 'af_id=afl_filter' ] ]
);
if ( !$row ) {