mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Merge "Use string cast for Postgres compatibility"
This commit is contained in:
commit
ca6ef32a69
|
@ -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 );
|
||||
|
|
|
@ -45,7 +45,7 @@ class AbuseLogPager extends ReverseChronologicalPager {
|
|||
[ 'abuse_filter' =>
|
||||
[
|
||||
'LEFT JOIN',
|
||||
'af_id=afl_filter',
|
||||
$this->mDb->buildStringCast( 'af_id' ) . '=afl_filter',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue