X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiQueryAllImages.php;h=6f497b199640d26d8173d67a5481afb033adc74e;hp=250bee667ff19309a4d5033d69e401e1273d4b9d;hb=5120937028f768749d058aa91dde82a96de0af1c;hpb=aba5106e9a98fbd914128f134ea8f18c14ca2db2 diff --git a/includes/api/ApiQueryAllImages.php b/includes/api/ApiQueryAllImages.php index 250bee667f..6f497b1996 100644 --- a/includes/api/ApiQueryAllImages.php +++ b/includes/api/ApiQueryAllImages.php @@ -90,10 +90,12 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase { $userId = !is_null( $params['user'] ) ? User::idFromName( $params['user'] ) : null; // Table and return fields - $this->addTables( 'image' ); - $prop = array_flip( $params['prop'] ); - $this->addFields( LocalFile::selectFields() ); + + $fileQuery = LocalFile::getQueryInfo(); + $this->addTables( $fileQuery['tables'] ); + $this->addFields( $fileQuery['fields'] ); + $this->addJoinConds( $fileQuery['joins'] ); $ascendingOrder = true; if ( $params['dir'] == 'descending' || $params['dir'] == 'older' ) {