From: Aaron Schulz Date: Thu, 12 Apr 2018 07:23:41 +0000 (-0700) Subject: Fix LocalFileMoveBatch query that was incompatibile with Postgres X-Git-Tag: 1.31.0-rc.0~104^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=4358ee16e80081d8fe8464132d63b1d62afc4448 Fix LocalFileMoveBatch query that was incompatibile with Postgres Bug: T160910 Change-Id: I7ed6acec08243ff8380d28bbe5d66610a77502dc --- diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 7fc45ebf4a..0464f071b5 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -3344,9 +3344,9 @@ class LocalFileMoveBatch { __METHOD__, [ 'FOR UPDATE' ] ); - $oldRowCount = $dbw->selectField( + $oldRowCount = $dbw->selectRowCount( 'oldimage', - 'COUNT(*)', + '*', [ 'oi_name' => $this->oldName ], __METHOD__, [ 'FOR UPDATE' ]