X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryAllImages.php;h=6f497b199640d26d8173d67a5481afb033adc74e;hb=59c5caf10c47c0042ce1a4d824e21cb47efa166c;hp=250bee667ff19309a4d5033d69e401e1273d4b9d;hpb=aae0c8d42562d5d3f70cc18fa687ae331996b66f;p=lhc%2Fweb%2Fwiklou.git 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' ) {