* @return string
*/
public function insertComment( $rc ) {
- if ( $this->isDeleted( $rc, Revision::DELETED_COMMENT ) ) {
+ if ( $this->isDeleted( $rc, RevisionRecord::DELETED_COMMENT ) ) {
return ' <span class="history-deleted">' .
$this->msg( 'rev-deleted-comment' )->escaped() . '</span>';
} else {
}
if ( $this->mOldRev ) {
- $this->mOldContent = $this->mOldRev->getContent( Revision::FOR_THIS_USER, $this->getUser() );
+ $this->mOldContent = $this->mOldRev->getContent(
+ RevisionRecord::FOR_THIS_USER, $this->getUser()
+ );
if ( $this->mOldContent === null ) {
return false;
}
}
- $this->mNewContent = $this->mNewRev->getContent( Revision::FOR_THIS_USER, $this->getUser() );
+ $this->mNewContent = $this->mNewRev->getContent(
+ RevisionRecord::FOR_THIS_USER, $this->getUser()
+ );
Hooks::run( 'DifferenceEngineLoadTextAfterNewContentIsLoaded', [ $this ] );
if ( $this->mNewContent === null ) {
return false;
return false;
}
- $this->mNewContent = $this->mNewRev->getContent( Revision::FOR_THIS_USER, $this->getUser() );
+ $this->mNewContent = $this->mNewRev->getContent(
+ RevisionRecord::FOR_THIS_USER, $this->getUser()
+ );
Hooks::run( 'DifferenceEngineAfterLoadNewText', [ $this ] );
* Call to WikiPage function for backwards compatibility.
* @see WikiPage::getComment
*/
- public function getComment( $audience = Revision::FOR_PUBLIC, User $user = null ) {
+ public function getComment( $audience = RevisionRecord::FOR_PUBLIC, User $user = null ) {
return $this->mPage->getComment( $audience, $user );
}
* Call to WikiPage function for backwards compatibility.
* @see WikiPage::getCreator
*/
- public function getCreator( $audience = Revision::FOR_PUBLIC, User $user = null ) {
+ public function getCreator( $audience = RevisionRecord::FOR_PUBLIC, User $user = null ) {
return $this->mPage->getCreator( $audience, $user );
}
* Call to WikiPage function for backwards compatibility.
* @see WikiPage::getUser
*/
- public function getUser( $audience = Revision::FOR_PUBLIC, User $user = null ) {
+ public function getUser( $audience = RevisionRecord::FOR_PUBLIC, User $user = null ) {
return $this->mPage->getUser( $audience, $user );
}
* Call to WikiPage function for backwards compatibility.
* @see WikiPage::getUserText
*/
- public function getUserText( $audience = Revision::FOR_PUBLIC, User $user = null ) {
+ public function getUserText( $audience = RevisionRecord::FOR_PUBLIC, User $user = null ) {
return $this->mPage->getUserText( $audience, $user );
}
*
* @since 1.21
*/
- public function getContent( $audience = Revision::FOR_PUBLIC, User $user = null ) {
+ public function getContent( $audience = RevisionRecord::FOR_PUBLIC, User $user = null ) {
$this->loadLastEdit();
if ( $this->mLastRevision ) {
return $this->mLastRevision->getContent( $audience, $user );
* to the $audience parameter
* @return int User ID for the user that made the last article revision
*/
- public function getUser( $audience = Revision::FOR_PUBLIC, User $user = null ) {
+ public function getUser( $audience = RevisionRecord::FOR_PUBLIC, User $user = null ) {
$this->loadLastEdit();
if ( $this->mLastRevision ) {
return $this->mLastRevision->getUser( $audience, $user );
* to the $audience parameter
* @return User|null
*/
- public function getCreator( $audience = Revision::FOR_PUBLIC, User $user = null ) {
+ public function getCreator( $audience = RevisionRecord::FOR_PUBLIC, User $user = null ) {
$revision = $this->getOldestRevision();
if ( $revision ) {
$userName = $revision->getUserText( $audience, $user );
* to the $audience parameter
* @return string Username of the user that made the last article revision
*/
- public function getUserText( $audience = Revision::FOR_PUBLIC, User $user = null ) {
+ public function getUserText( $audience = RevisionRecord::FOR_PUBLIC, User $user = null ) {
$this->loadLastEdit();
if ( $this->mLastRevision ) {
return $this->mLastRevision->getUserText( $audience, $user );
* @return string|null Comment stored for the last article revision, or null if the specified
* audience does not have access to the comment.
*/
- public function getComment( $audience = Revision::FOR_PUBLIC, User $user = null ) {
+ public function getComment( $audience = RevisionRecord::FOR_PUBLIC, User $user = null ) {
$this->loadLastEdit();
if ( $this->mLastRevision ) {
return $this->mLastRevision->getComment( $audience, $user );