Display the file sha1 value in the file info page
[lhc/web/wiklou.git] / includes / api / ApiQueryDeletedRevisions.php
index 90fd695..3339fec 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * Created on Oct 3, 2014
  *
- * Copyright © 2014 Brad Jorsch "bjorsch@wikimedia.org"
+ * Copyright © 2014 Wikimedia Foundation and contributors
  *
  * Heavily based on ApiQueryDeletedrevs,
  * Copyright © 2007 Roan Kattouw "<Firstname>.<Lastname>@gmail.com"
@@ -60,13 +60,16 @@ class ApiQueryDeletedRevisions extends ApiQueryRevisionsBase {
 
                $this->requireMaxOneParameter( $params, 'user', 'excludeuser' );
 
-               $this->addTables( 'archive' );
                if ( $resultPageSet === null ) {
                        $this->parseParameters( $params );
-                       $this->addFields( Revision::selectArchiveFields() );
+                       $arQuery = Revision::getArchiveQueryInfo();
+                       $this->addTables( $arQuery['tables'] );
+                       $this->addFields( $arQuery['fields'] );
+                       $this->addJoinConds( $arQuery['joins'] );
                        $this->addFields( [ 'ar_title', 'ar_namespace' ] );
                } else {
                        $this->limit = $this->getParameter( 'limit' ) ?: 10;
+                       $this->addTables( 'archive' );
                        $this->addFields( [ 'ar_title', 'ar_namespace', 'ar_timestamp', 'ar_rev_id', 'ar_id' ] );
                }