* @param $row Mixed: either a database row or an array
* @access private
*/
- function Revision( $row ) {
+ function __construct( $row ) {
if( is_object( $row ) ) {
$this->mId = intval( $row->rev_id );
$this->mPage = intval( $row->rev_page );
if( isset( $row->page_latest ) ) {
$this->mCurrent = ( $row->rev_id == $row->page_latest );
- $this->mTitle = Title::makeTitle( $row->page_namespace, $row->page_title );
- $this->mTitle->resetArticleID( $this->mPage );
+ $this->mTitle = Title::newFromRow( $row );
} else {
$this->mCurrent = false;
$this->mTitle = null;
/**
* Alias for getText(Revision::FOR_THIS_USER)
*
+ * @deprecated
* @return String
*/
public function revText() {
$this->mTextId = $dbw->insertId();
}
+ if ( $this->mComment === null ) $this->mComment = "";
+
# Record the edit in revisions
$rev_id = isset( $this->mId )
? $this->mId
public static function userCanBitfield( $bitfield, $field ) {
if( $bitfield & $field ) { // aspect is deleted
global $wgUser;
- $permission = '';
if ( $bitfield & self::DELETED_RESTRICTED ) {
$permission = 'suppressrevision';
} elseif ( $field & self::DELETED_TEXT ) {