40 'ManualRevertSearchRadius',
105 if ( $this->revisionRecord === null ) {
107 'Revision was not set prior to building an EditResult'
116 $this->originalRevisionId,
118 $this->oldestRevertedRevId,
119 $this->newestRevertedRevId,
133 $this->revisionRecord = $revisionRecord;
143 $this->isNew = $isNew;
158 int $oldestRevertedRevId,
159 int $newestRevertedRevId = 0
161 if ( $oldestRevertedRevId === 0 ) {
164 if ( $newestRevertedRevId === 0 ) {
165 $newestRevertedRevId = $oldestRevertedRevId;
168 $this->revertMethod = $revertMethod;
169 $this->oldestRevertedRevId = $oldestRevertedRevId;
170 $this->newestRevertedRevId = $newestRevertedRevId;
179 $this->originalRevisionId = $originalRevId;
190 $searchRadius = $this->options->get(
'ManualRevertSearchRadius' );
191 if ( !$searchRadius ||
193 $this->revertMethod !==
null ||
195 $this->isNullEdit() ||
198 !$this->revisionRecord->getParentId()
203 $revertedToRev = $this->revisionStore->findIdenticalRevision( $this->revisionRecord, $searchRadius );
204 if ( !$revertedToRev ) {
207 $oldestReverted = $this->revisionStore->getNextRevision(
209 RevisionStore::READ_LATEST
211 if ( !$oldestReverted ) {
215 $this->setOriginalRevisionId( $revertedToRev->getId() );
218 $oldestReverted->getId(),
219 $this->revisionRecord->getParentId()
232 int $flags = RevisionStore::READ_NORMAL
234 if ( $this->originalRevision ) {
235 return $this->originalRevision;
237 if ( $this->originalRevisionId ===
false ) {
241 $this->originalRevision = $this->revisionStore->getRevisionById(
242 $this->originalRevisionId,
245 return $this->originalRevision;
255 if ( $this->isNew || $this->oldestRevertedRevId === null ) {
259 if ( $this->getOriginalRevision() ===
null ) {
264 return $this->revisionRecord->hasSameContent( $this->getOriginalRevision() );
273 if ( $this->isNew ) {
277 return $this->getOriginalRevision() &&
278 $this->originalRevisionId === $this->revisionRecord->getParentId();
287 if ( isset( self::REVERT_METHOD_TO_CHANGE_TAG[$this->revertMethod] ) ) {
288 $revertTag = self::REVERT_METHOD_TO_CHANGE_TAG[$this->revertMethod];
289 if ( in_array( $revertTag, $this->softwareTags ) ) {
290 return [ $revertTag ];
if(ini_get('mbstring.func_overload')) if(!defined('MW_ENTRY_POINT'))
Pre-config setup: Before loading LocalSettings.php.
Exception representing a failure to update a page entry.