44 private $maxTimestamp;
47 private $linkBatchFactory;
50 private $revisionStore;
71 $this->mConds = $conds;
72 $this->articleID =
$source->getId();
75 $maxtimestamp =
$dbr->selectField(
78 [
'rev_page' => $dest->
getId() ],
81 $this->maxTimestamp = $maxtimestamp;
86 $this->linkBatchFactory = $linkBatchFactory;
87 $this->revisionStore = $revisionStore;
91 # Do a link batch query
92 $this->mResult->seek( 0 );
93 $batch = $this->linkBatchFactory->newLinkBatch();
94 # Give some pointers to make (last) links
95 $this->mForm->prevId = [];
97 foreach ( $this->mResult as $row ) {
98 $batch->add(
NS_USER, $row->rev_user_text );
101 if ( isset( $rev_id ) ) {
102 if ( $rev_id > $row->rev_id ) {
103 $this->mForm->prevId[$rev_id] = $row->rev_id;
104 } elseif ( $rev_id < $row->rev_id ) {
105 $this->mForm->prevId[$row->rev_id] = $rev_id;
109 $rev_id = $row->rev_id;
113 $this->mResult->seek( 0 );
120 return "<section class='mw-pager-body'>\n";
127 return "</section>\n";
131 return $this->mForm->formatRevisionRow( $row );
137 $conds[
'rev_page'] = $this->articleID;
138 $conds[] =
"rev_timestamp < " .
$dbr->addQuotes( $this->maxTimestamp );
140 $queryInfo = $this->revisionStore->getQueryInfo( [
'page',
'user' ] );
141 $queryInfo[
'conds'] = $conds;
142 $queryInfo[
'options'] = [];
145 $queryInfo[
'join_conds'] = $queryInfo[
'joins'];
146 unset( $queryInfo[
'joins'] );
149 $queryInfo[
'tables'],
150 $queryInfo[
'fields'],
152 $queryInfo[
'join_conds'],
153 $queryInfo[
'options'],
161 return [ [
'rev_timestamp',
'rev_id' ] ];
Special page allowing users with the appropriate permissions to merge article histories,...
getContext()
Gets the context this SpecialPage is executed in.
Interface for objects (potentially) representing an editable wiki page.
getId( $wikiId=self::LOCAL)
Returns the page ID.