Merge "Add attributes parameter to ShowSearchHitTitle"
[lhc/web/wiklou.git] / includes / revisiondelete / RevDelFileList.php
index 00cb2e1..6a6b86c 100644 (file)
@@ -19,6 +19,8 @@
  * @ingroup RevisionDelete
  */
 
+use Wikimedia\Rdbms\IDatabase;
+
 /**
  * List for oldimage table items
  */
@@ -58,15 +60,17 @@ class RevDelFileList extends RevDelList {
                        $archiveNames[] = $timestamp . '!' . $this->title->getDBkey();
                }
 
+               $oiQuery = OldLocalFile::getQueryInfo();
                return $db->select(
-                       'oldimage',
-                       OldLocalFile::selectFields(),
+                       $oiQuery['tables'],
+                       $oiQuery['fields'],
                        [
                                'oi_name' => $this->title->getDBkey(),
                                'oi_archive_name' => $archiveNames
                        ],
                        __METHOD__,
-                       [ 'ORDER BY' => 'oi_timestamp DESC' ]
+                       [ 'ORDER BY' => 'oi_timestamp DESC' ],
+                       $oiQuery['joins']
                );
        }