revisionStore = $revisionStore; } public function getType() { return 'archive'; } public static function getRelationType() { return 'ar_timestamp'; } /** * @param \Wikimedia\Rdbms\IReadableDatabase $db * @return IResultWrapper */ public function doQuery( $db ) { $timestamps = []; foreach ( $this->ids as $id ) { $timestamps[] = $db->timestamp( $id ); } $queryBuilder = $this->revisionStore->newArchiveSelectQueryBuilder( $db ) ->joinComment() ->where( [ 'ar_namespace' => $this->getPage()->getNamespace(), 'ar_title' => $this->getPage()->getDBkey(), 'ar_timestamp' => $timestamps, ] ) ->orderBy( 'ar_timestamp', SelectQueryBuilder::SORT_DESC ); MediaWikiServices::getInstance()->getChangeTagsStore()->modifyDisplayQueryBuilder( $queryBuilder, 'archive' ); return $queryBuilder->caller( __METHOD__ )->fetchResultSet(); } public function newItem( $row ) { return new RevDelArchiveItem( $this, $row ); } public function doPreCommitUpdates() { return Status::newGood(); } public function doPostCommitUpdates( array $visibilityChangeMap ) { return Status::newGood(); } }