|
@@ 658-664 (lines=7) @@
|
| 655 |
|
* |
| 656 |
|
* @since 1.21 |
| 657 |
|
*/ |
| 658 |
|
public function getContent( $audience = Revision::FOR_PUBLIC, User $user = null ) { |
| 659 |
|
$this->loadLastEdit(); |
| 660 |
|
if ( $this->mLastRevision ) { |
| 661 |
|
return $this->mLastRevision->getContent( $audience, $user ); |
| 662 |
|
} |
| 663 |
|
return null; |
| 664 |
|
} |
| 665 |
|
|
| 666 |
|
/** |
| 667 |
|
* Get the text of the current revision. No side-effects... |
|
@@ 718-725 (lines=8) @@
|
| 715 |
|
* to the $audience parameter |
| 716 |
|
* @return int User ID for the user that made the last article revision |
| 717 |
|
*/ |
| 718 |
|
public function getUser( $audience = Revision::FOR_PUBLIC, User $user = null ) { |
| 719 |
|
$this->loadLastEdit(); |
| 720 |
|
if ( $this->mLastRevision ) { |
| 721 |
|
return $this->mLastRevision->getUser( $audience, $user ); |
| 722 |
|
} else { |
| 723 |
|
return -1; |
| 724 |
|
} |
| 725 |
|
} |
| 726 |
|
|
| 727 |
|
/** |
| 728 |
|
* Get the User object of the user who created the page |
|
@@ 756-763 (lines=8) @@
|
| 753 |
|
* to the $audience parameter |
| 754 |
|
* @return string Username of the user that made the last article revision |
| 755 |
|
*/ |
| 756 |
|
public function getUserText( $audience = Revision::FOR_PUBLIC, User $user = null ) { |
| 757 |
|
$this->loadLastEdit(); |
| 758 |
|
if ( $this->mLastRevision ) { |
| 759 |
|
return $this->mLastRevision->getUserText( $audience, $user ); |
| 760 |
|
} else { |
| 761 |
|
return ''; |
| 762 |
|
} |
| 763 |
|
} |
| 764 |
|
|
| 765 |
|
/** |
| 766 |
|
* @param int $audience One of: |
|
@@ 774-781 (lines=8) @@
|
| 771 |
|
* to the $audience parameter |
| 772 |
|
* @return string Comment stored for the last article revision |
| 773 |
|
*/ |
| 774 |
|
public function getComment( $audience = Revision::FOR_PUBLIC, User $user = null ) { |
| 775 |
|
$this->loadLastEdit(); |
| 776 |
|
if ( $this->mLastRevision ) { |
| 777 |
|
return $this->mLastRevision->getComment( $audience, $user ); |
| 778 |
|
} else { |
| 779 |
|
return ''; |
| 780 |
|
} |
| 781 |
|
} |
| 782 |
|
|
| 783 |
|
/** |
| 784 |
|
* Returns true if last revision was marked as "minor edit" |