83 if ( $this->revisionRecord === null ) {
85 'Revision was not set prior to building an EditResult'
91 $this->originalRevisionId,
93 $this->oldestRevertedRevId,
94 $this->newestRevertedRevId,
108 $this->revisionRecord = $revisionRecord;
118 $this->isNew = $isNew;
133 int $oldestRevertedRevId,
134 int $newestRevertedRevId = 0
136 if ( $oldestRevertedRevId === 0 ) {
139 if ( $newestRevertedRevId === 0 ) {
140 $newestRevertedRevId = $oldestRevertedRevId;
143 $this->revertMethod = $revertMethod;
144 $this->oldestRevertedRevId = $oldestRevertedRevId;
145 $this->newestRevertedRevId = $newestRevertedRevId;
154 $this->originalRevisionId = $originalRevId;
166 int $flags = RevisionStore::READ_NORMAL
168 if ( $this->originalRevision ) {
169 return $this->originalRevision;
171 if ( $this->originalRevisionId ===
false ) {
175 $this->originalRevision = $this->revisionStore->getRevisionById(
176 $this->originalRevisionId,
179 return $this->originalRevision;
189 if ( $this->isNew || $this->oldestRevertedRevId === null ) {
193 if ( $this->getOriginalRevision() ===
null ) {
198 return $this->revisionRecord->hasSameContent( $this->getOriginalRevision() );
207 if ( $this->isNew ) {
211 return $this->getOriginalRevision() &&
212 $this->originalRevisionId === $this->revisionRecord->getParentId();
222 in_array(
'mw-undo', $this->softwareTags )
224 return [
'mw-undo' ];
225 } elseif ( $this->revertMethod === EditResult::REVERT_ROLLBACK &&
226 in_array(
'mw-rollback', $this->softwareTags )
228 return [
'mw-rollback' ];
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.