|
@@ 675-681 (lines=7) @@
|
| 672 |
|
* |
| 673 |
|
* @since 1.21 |
| 674 |
|
*/ |
| 675 |
|
public function getContent( $audience = Revision::FOR_PUBLIC, User $user = null ) { |
| 676 |
|
$this->loadLastEdit(); |
| 677 |
|
if ( $this->mLastRevision ) { |
| 678 |
|
return $this->mLastRevision->getContent( $audience, $user ); |
| 679 |
|
} |
| 680 |
|
return null; |
| 681 |
|
} |
| 682 |
|
|
| 683 |
|
/** |
| 684 |
|
* Get the text of the current revision. No side-effects... |
|
@@ 735-742 (lines=8) @@
|
| 732 |
|
* to the $audience parameter |
| 733 |
|
* @return int User ID for the user that made the last article revision |
| 734 |
|
*/ |
| 735 |
|
public function getUser( $audience = Revision::FOR_PUBLIC, User $user = null ) { |
| 736 |
|
$this->loadLastEdit(); |
| 737 |
|
if ( $this->mLastRevision ) { |
| 738 |
|
return $this->mLastRevision->getUser( $audience, $user ); |
| 739 |
|
} else { |
| 740 |
|
return -1; |
| 741 |
|
} |
| 742 |
|
} |
| 743 |
|
|
| 744 |
|
/** |
| 745 |
|
* Get the User object of the user who created the page |
|
@@ 773-780 (lines=8) @@
|
| 770 |
|
* to the $audience parameter |
| 771 |
|
* @return string Username of the user that made the last article revision |
| 772 |
|
*/ |
| 773 |
|
public function getUserText( $audience = Revision::FOR_PUBLIC, User $user = null ) { |
| 774 |
|
$this->loadLastEdit(); |
| 775 |
|
if ( $this->mLastRevision ) { |
| 776 |
|
return $this->mLastRevision->getUserText( $audience, $user ); |
| 777 |
|
} else { |
| 778 |
|
return ''; |
| 779 |
|
} |
| 780 |
|
} |
| 781 |
|
|
| 782 |
|
/** |
| 783 |
|
* @param int $audience One of: |
|
@@ 791-798 (lines=8) @@
|
| 788 |
|
* to the $audience parameter |
| 789 |
|
* @return string Comment stored for the last article revision |
| 790 |
|
*/ |
| 791 |
|
public function getComment( $audience = Revision::FOR_PUBLIC, User $user = null ) { |
| 792 |
|
$this->loadLastEdit(); |
| 793 |
|
if ( $this->mLastRevision ) { |
| 794 |
|
return $this->mLastRevision->getComment( $audience, $user ); |
| 795 |
|
} else { |
| 796 |
|
return ''; |
| 797 |
|
} |
| 798 |
|
} |
| 799 |
|
|
| 800 |
|
/** |
| 801 |
|
* Returns true if last revision was marked as "minor edit" |