} else {
if ( $this->section != '' ) {
// Get section edit text (returns $def_text for invalid sections)
- $orig = $this->getOriginalContent();
+ $orig = $this->getOriginalContent( $wgUser );
$content = $orig ? $orig->getSection( $this->section ) : null;
if ( !$content ) {
}
if ( $content === false ) {
- $content = $this->getOriginalContent();
+ $content = $this->getOriginalContent( $wgUser );
}
}
}
* 'missing-revision' message.
*
* @since 1.19
+ * @param User $user The user to get the revision for
* @return Content|null
*/
- private function getOriginalContent() {
+ private function getOriginalContent( User $user ) {
if ( $this->section == 'new' ) {
return $this->getCurrentContent();
}
return $handler->makeEmptyContent();
}
- $content = $revision->getContent();
+ $content = $revision->getContent( Revision::FOR_THIS_USER, $user );
return $content;
}
return $status;
}
} elseif ( !$this->allowBlankSummary
- && !$content->equals( $this->getOriginalContent() )
+ && !$content->equals( $this->getOriginalContent( $wgUser ) )
&& !$content->isRedirect()
&& md5( $this->summary ) == $this->autoSumm
) {