11 const DELETED_TEXT
= 1;
12 const DELETED_COMMENT
= 2;
13 const DELETED_USER
= 4;
14 const DELETED_RESTRICTED
= 8;
16 // Audience options for Revision::getText()
18 const FOR_THIS_USER
= 2;
22 * Load a page revision from a given revision ID number.
23 * Returns null if no such revision can be found.
29 public static function newFromId( $id ) {
30 return Revision
::newFromConds(
31 array( 'page_id=rev_page',
32 'rev_id' => intval( $id ) ) );
36 * Load either the current, or a specified, revision
37 * that's attached to a given title. If not attached
38 * to that title, will return null.
44 public static function newFromTitle( $title, $id = 0 ) {
46 'page_namespace' => $title->getNamespace(),
47 'page_title' => $title->getDBkey()
50 // Use the specified ID
51 $conds['rev_id'] = $id;
52 } elseif ( wfGetLB()->getServerCount() > 1 ) {
53 // Get the latest revision ID from the master
54 $dbw = wfGetDB( DB_MASTER
);
55 $latest = $dbw->selectField( 'page', 'page_latest', $conds, __METHOD__
);
56 if ( $latest === false ) {
57 // Page does not exist
60 $conds['rev_id'] = $latest;
62 // Use a join to get the latest revision
63 $conds[] = 'rev_id=page_latest';
65 $conds[] = 'page_id=rev_page';
66 return Revision
::newFromConds( $conds );
70 * Load a page revision from a given revision ID number.
71 * Returns null if no such revision can be found.
78 public static function loadFromId( $db, $id ) {
79 return Revision
::loadFromConds( $db,
80 array( 'page_id=rev_page',
81 'rev_id' => intval( $id ) ) );
85 * Load either the current, or a specified, revision
86 * that's attached to a given page. If not attached
87 * to that page, will return null.
96 public static function loadFromPageId( $db, $pageid, $id = 0 ) {
97 $conds=array('page_id=rev_page','rev_page'=>intval( $pageid ), 'page_id'=>intval( $pageid ));
99 $conds['rev_id']=intval($id);
101 $conds[]='rev_id=page_latest';
103 return Revision
::loadFromConds( $db, $conds );
107 * Load either the current, or a specified, revision
108 * that's attached to a given page. If not attached
109 * to that page, will return null.
111 * @param Database $db
112 * @param Title $title
118 public static function loadFromTitle( $db, $title, $id = 0 ) {
120 $matchId = intval( $id );
122 $matchId = 'page_latest';
124 return Revision
::loadFromConds(
126 array( "rev_id=$matchId",
128 'page_namespace' => $title->getNamespace(),
129 'page_title' => $title->getDBkey() ) );
133 * Load the revision for the given title with the given timestamp.
134 * WARNING: Timestamps may in some circumstances not be unique,
135 * so this isn't the best key to use.
137 * @param Database $db
138 * @param Title $title
139 * @param string $timestamp
144 public static function loadFromTimestamp( $db, $title, $timestamp ) {
145 return Revision
::loadFromConds(
147 array( 'rev_timestamp' => $db->timestamp( $timestamp ),
149 'page_namespace' => $title->getNamespace(),
150 'page_title' => $title->getDBkey() ) );
154 * Given a set of conditions, fetch a revision.
156 * @param array $conditions
161 private static function newFromConds( $conditions ) {
162 $db = wfGetDB( DB_SLAVE
);
163 $row = Revision
::loadFromConds( $db, $conditions );
164 if( is_null( $row ) && wfGetLB()->getServerCount() > 1 ) {
165 $dbw = wfGetDB( DB_MASTER
);
166 $row = Revision
::loadFromConds( $dbw, $conditions );
172 * Given a set of conditions, fetch a revision from
173 * the given database connection.
175 * @param Database $db
176 * @param array $conditions
181 private static function loadFromConds( $db, $conditions ) {
182 $res = Revision
::fetchFromConds( $db, $conditions );
184 $row = $res->fetchObject();
187 $ret = new Revision( $row );
196 * Return a wrapper for a series of database rows to
197 * fetch all of a given page's revisions in turn.
198 * Each row can be fed to the constructor to get objects.
200 * @param Title $title
201 * @return ResultWrapper
205 public static function fetchAllRevisions( $title ) {
206 return Revision
::fetchFromConds(
208 array( 'page_namespace' => $title->getNamespace(),
209 'page_title' => $title->getDBkey(),
210 'page_id=rev_page' ) );
214 * Return a wrapper for a series of database rows to
215 * fetch all of a given page's revisions in turn.
216 * Each row can be fed to the constructor to get objects.
218 * @param Title $title
219 * @return ResultWrapper
223 public static function fetchRevision( $title ) {
224 return Revision
::fetchFromConds(
226 array( 'rev_id=page_latest',
227 'page_namespace' => $title->getNamespace(),
228 'page_title' => $title->getDBkey(),
229 'page_id=rev_page' ) );
233 * Given a set of conditions, return a ResultWrapper
234 * which will return matching database rows with the
235 * fields necessary to build Revision objects.
237 * @param Database $db
238 * @param array $conditions
239 * @return ResultWrapper
243 private static function fetchFromConds( $db, $conditions ) {
244 $fields = self
::selectFields();
245 $fields[] = 'page_namespace';
246 $fields[] = 'page_title';
247 $fields[] = 'page_latest';
249 array( 'page', 'revision' ),
253 array( 'LIMIT' => 1 ) );
254 $ret = $db->resultObject( $res );
259 * Return the list of revision fields that should be selected to create
262 static function selectFields() {
279 * Return the list of text fields that should be selected to read the
282 static function selectTextFields() {
289 * Return the list of page fields that should be selected from page table
291 static function selectPageFields() {
303 function Revision( $row ) {
304 if( is_object( $row ) ) {
305 $this->mId
= intval( $row->rev_id
);
306 $this->mPage
= intval( $row->rev_page
);
307 $this->mTextId
= intval( $row->rev_text_id
);
308 $this->mComment
= $row->rev_comment
;
309 $this->mUserText
= $row->rev_user_text
;
310 $this->mUser
= intval( $row->rev_user
);
311 $this->mMinorEdit
= intval( $row->rev_minor_edit
);
312 $this->mTimestamp
= $row->rev_timestamp
;
313 $this->mDeleted
= intval( $row->rev_deleted
);
315 if( !isset( $row->rev_parent_id
) )
316 $this->mParentId
= is_null($row->rev_parent_id
) ?
null : 0;
318 $this->mParentId
= intval( $row->rev_parent_id
);
320 if( !isset( $row->rev_len
) ||
is_null( $row->rev_len
) )
323 $this->mSize
= intval( $row->rev_len
);
325 if( isset( $row->page_latest
) ) {
326 $this->mCurrent
= ( $row->rev_id
== $row->page_latest
);
327 $this->mTitle
= Title
::makeTitle( $row->page_namespace
, $row->page_title
);
328 $this->mTitle
->resetArticleID( $this->mPage
);
330 $this->mCurrent
= false;
331 $this->mTitle
= null;
334 // Lazy extraction...
336 if( isset( $row->old_text
) ) {
337 $this->mTextRow
= $row;
339 // 'text' table row entry will be lazy-loaded
340 $this->mTextRow
= null;
342 } elseif( is_array( $row ) ) {
343 // Build a new revision to be saved...
346 $this->mId
= isset( $row['id'] ) ?
intval( $row['id'] ) : null;
347 $this->mPage
= isset( $row['page'] ) ?
intval( $row['page'] ) : null;
348 $this->mTextId
= isset( $row['text_id'] ) ?
intval( $row['text_id'] ) : null;
349 $this->mUserText
= isset( $row['user_text'] ) ?
strval( $row['user_text'] ) : $wgUser->getName();
350 $this->mUser
= isset( $row['user'] ) ?
intval( $row['user'] ) : $wgUser->getId();
351 $this->mMinorEdit
= isset( $row['minor_edit'] ) ?
intval( $row['minor_edit'] ) : 0;
352 $this->mTimestamp
= isset( $row['timestamp'] ) ?
strval( $row['timestamp'] ) : wfTimestamp( TS_MW
);
353 $this->mDeleted
= isset( $row['deleted'] ) ?
intval( $row['deleted'] ) : 0;
354 $this->mSize
= isset( $row['len'] ) ?
intval( $row['len'] ) : null;
355 $this->mParentId
= isset( $row['parent_id'] ) ?
intval( $row['parent_id'] ) : null;
357 // Enforce spacing trimming on supplied text
358 $this->mComment
= isset( $row['comment'] ) ?
trim( strval( $row['comment'] ) ) : null;
359 $this->mText
= isset( $row['text'] ) ?
rtrim( strval( $row['text'] ) ) : null;
360 $this->mTextRow
= null;
362 $this->mTitle
= null; # Load on demand if needed
363 $this->mCurrent
= false;
364 # If we still have no len_size, see it we have the text to figure it out
366 $this->mSize
= is_null($this->mText
) ?
null : strlen($this->mText
);
368 throw new MWException( 'Revision constructor passed invalid row format.' );
370 $this->mUnpatrolled
= NULL;
381 public function getId() {
389 public function getTextId() {
390 return $this->mTextId
;
394 * Get parent revision ID (the original previous page revision)
397 public function getParentId() {
398 return $this->mParentId
;
402 * Returns the length of the text in this revision, or null if unknown.
405 public function getSize() {
410 * Returns the title of the page associated with this entry.
413 public function getTitle() {
414 if( isset( $this->mTitle
) ) {
415 return $this->mTitle
;
417 $dbr = wfGetDB( DB_SLAVE
);
418 $row = $dbr->selectRow(
419 array( 'page', 'revision' ),
420 array( 'page_namespace', 'page_title' ),
421 array( 'page_id=rev_page',
422 'rev_id' => $this->mId
),
423 'Revision::getTitle' );
425 $this->mTitle
= Title
::makeTitle( $row->page_namespace
,
428 return $this->mTitle
;
432 * Set the title of the revision
433 * @param Title $title
435 public function setTitle( $title ) {
436 $this->mTitle
= $title;
443 public function getPage() {
448 * Fetch revision's user id if it's available to the specified audience.
449 * If the specified audience does not have access to it, zero will be
452 * @param integer $audience One of:
453 * Revision::FOR_PUBLIC to be displayed to all users
454 * Revision::FOR_THIS_USER to be displayed to $wgUser
455 * Revision::RAW get the ID regardless of permissions
460 public function getUser( $audience = self
::FOR_PUBLIC
) {
461 if( $audience == self
::FOR_PUBLIC
&& $this->isDeleted( self
::DELETED_USER
) ) {
463 } elseif( $audience == self
::FOR_THIS_USER
&& !$this->userCan( self
::DELETED_USER
) ) {
471 * Fetch revision's user id without regard for the current user's permissions
474 public function getRawUser() {
479 * Fetch revision's username if it's available to the specified audience.
480 * If the specified audience does not have access to the username, an
481 * empty string will be returned.
483 * @param integer $audience One of:
484 * Revision::FOR_PUBLIC to be displayed to all users
485 * Revision::FOR_THIS_USER to be displayed to $wgUser
486 * Revision::RAW get the text regardless of permissions
490 public function getUserText( $audience = self
::FOR_PUBLIC
) {
491 if( $audience == self
::FOR_PUBLIC
&& $this->isDeleted( self
::DELETED_USER
) ) {
493 } elseif( $audience == self
::FOR_THIS_USER
&& !$this->userCan( self
::DELETED_USER
) ) {
496 return $this->mUserText
;
501 * Fetch revision's username without regard for view restrictions
504 public function getRawUserText() {
505 return $this->mUserText
;
509 * Fetch revision comment if it's available to the specified audience.
510 * If the specified audience does not have access to the comment, an
511 * empty string will be returned.
513 * @param integer $audience One of:
514 * Revision::FOR_PUBLIC to be displayed to all users
515 * Revision::FOR_THIS_USER to be displayed to $wgUser
516 * Revision::RAW get the text regardless of permissions
520 function getComment( $audience = self
::FOR_PUBLIC
) {
521 if( $audience == self
::FOR_PUBLIC
&& $this->isDeleted( self
::DELETED_COMMENT
) ) {
523 } elseif( $audience == self
::FOR_THIS_USER
&& !$this->userCan( self
::DELETED_COMMENT
) ) {
526 return $this->mComment
;
531 * Fetch revision comment without regard for the current user's permissions
534 public function getRawComment() {
535 return $this->mComment
;
541 public function isMinor() {
542 return (bool)$this->mMinorEdit
;
546 * @return int rcid of the unpatrolled row, zero if there isn't one
548 public function isUnpatrolled() {
549 if( $this->mUnpatrolled
!== NULL ) {
550 return $this->mUnpatrolled
;
552 $dbr = wfGetDB( DB_SLAVE
);
553 $this->mUnpatrolled
= $dbr->selectField( 'recentchanges',
555 array( // Add redundant user,timestamp condition so we can use the existing index
556 'rc_user_text' => $this->getRawUserText(),
557 'rc_timestamp' => $dbr->timestamp( $this->getTimestamp() ),
558 'rc_this_oldid' => $this->getId(),
563 return (int)$this->mUnpatrolled
;
567 * int $field one of DELETED_* bitfield constants
570 public function isDeleted( $field ) {
571 return ($this->mDeleted
& $field) == $field;
575 * Get the deletion bitfield of the revision
577 public function getVisibility() {
578 return (int)$this->mDeleted
;
582 * Fetch revision text if it's available to the specified audience.
583 * If the specified audience does not have the ability to view this
584 * revision, an empty string will be returned.
586 * @param integer $audience One of:
587 * Revision::FOR_PUBLIC to be displayed to all users
588 * Revision::FOR_THIS_USER to be displayed to $wgUser
589 * Revision::RAW get the text regardless of permissions
594 public function getText( $audience = self
::FOR_PUBLIC
) {
595 if( $audience == self
::FOR_PUBLIC
&& $this->isDeleted( self
::DELETED_TEXT
) ) {
597 } elseif( $audience == self
::FOR_THIS_USER
&& !$this->userCan( self
::DELETED_TEXT
) ) {
600 return $this->getRawText();
605 * Alias for getText(Revision::FOR_THIS_USER)
607 public function revText() {
608 return $this->getText( self
::FOR_THIS_USER
);
612 * Fetch revision text without regard for view restrictions
615 public function getRawText() {
616 if( is_null( $this->mText
) ) {
617 // Revision text is immutable. Load on demand:
618 $this->mText
= $this->loadText();
626 public function getTimestamp() {
627 return wfTimestamp(TS_MW
, $this->mTimestamp
);
633 public function isCurrent() {
634 return $this->mCurrent
;
638 * Get previous revision for this title
641 public function getPrevious() {
642 if( $this->getTitle() ) {
643 $prev = $this->getTitle()->getPreviousRevisionID( $this->getId() );
645 return Revision
::newFromTitle( $this->getTitle(), $prev );
654 public function getNext() {
655 if( $this->getTitle() ) {
656 $next = $this->getTitle()->getNextRevisionID( $this->getId() );
658 return Revision
::newFromTitle( $this->getTitle(), $next );
665 * Get previous revision Id for this page_id
666 * This is used to populate rev_parent_id on save
667 * @param Database $db
670 private function getPreviousRevisionId( $db ) {
671 if( is_null($this->mPage
) ) {
674 # Use page_latest if ID is not given
676 $prevId = $db->selectField( 'page', 'page_latest',
677 array( 'page_id' => $this->mPage
),
680 $prevId = $db->selectField( 'revision', 'rev_id',
681 array( 'rev_page' => $this->mPage
, 'rev_id < ' . $this->mId
),
683 array( 'ORDER BY' => 'rev_id DESC' ) );
685 return intval($prevId);
689 * Get revision text associated with an old or archive row
690 * $row is usually an object from wfFetchRow(), both the flags and the text
691 * field must be included
693 * @param object $row The text data
694 * @param string $prefix table prefix (default 'old_')
695 * @return string $text|false the text requested
697 public static function getRevisionText( $row, $prefix = 'old_' ) {
698 wfProfileIn( __METHOD__
);
701 $textField = $prefix . 'text';
702 $flagsField = $prefix . 'flags';
704 if( isset( $row->$flagsField ) ) {
705 $flags = explode( ',', $row->$flagsField );
710 if( isset( $row->$textField ) ) {
711 $text = $row->$textField;
713 wfProfileOut( __METHOD__
);
717 # Use external methods for external objects, text in table is URL-only then
718 if ( in_array( 'external', $flags ) ) {
720 @list
(/* $proto */,$path)=explode('://',$url,2);
722 wfProfileOut( __METHOD__
);
725 $text=ExternalStore
::fetchFromURL($url);
728 // If the text was fetched without an error, convert it
729 if ( $text !== false ) {
730 if( in_array( 'gzip', $flags ) ) {
731 # Deal with optional compression of archived pages.
732 # This can be done periodically via maintenance/compressOld.php, and
733 # as pages are saved if $wgCompressRevisions is set.
734 $text = gzinflate( $text );
737 if( in_array( 'object', $flags ) ) {
738 # Generic compressed storage
739 $obj = unserialize( $text );
740 if ( !is_object( $obj ) ) {
742 wfProfileOut( __METHOD__
);
745 $text = $obj->getText();
748 global $wgLegacyEncoding;
749 if( $wgLegacyEncoding && !in_array( 'utf-8', $flags ) && !in_array( 'utf8', $flags ) ) {
750 # Old revisions kept around in a legacy encoding?
751 # Upconvert on demand.
752 # ("utf8" checked for compatibility with some broken
753 # conversion scripts 2008-12-30)
754 global $wgInputEncoding, $wgContLang;
755 $text = $wgContLang->iconv( $wgLegacyEncoding, $wgInputEncoding, $text );
758 wfProfileOut( __METHOD__
);
763 * If $wgCompressRevisions is enabled, we will compress data.
764 * The input string is modified in place.
765 * Return value is the flags field: contains 'gzip' if the
766 * data is compressed, and 'utf-8' if we're saving in UTF-8
769 * @param mixed $text reference to a text
772 public static function compressRevisionText( &$text ) {
773 global $wgCompressRevisions;
776 # Revisions not marked this way will be converted
777 # on load if $wgLegacyCharset is set in the future.
780 if( $wgCompressRevisions ) {
781 if( function_exists( 'gzdeflate' ) ) {
782 $text = gzdeflate( $text );
785 wfDebug( "Revision::compressRevisionText() -- no zlib support, not compressing\n" );
788 return implode( ',', $flags );
792 * Insert a new revision into the database, returning the new revision ID
793 * number on success and dies horribly on failure.
795 * @param Database $dbw
798 public function insertOn( $dbw ) {
799 global $wgDefaultExternalStore;
801 wfProfileIn( __METHOD__
);
803 $data = $this->mText
;
804 $flags = Revision
::compressRevisionText( $data );
806 # Write to external storage if required
807 if( $wgDefaultExternalStore ) {
808 // Store and get the URL
809 $data = ExternalStore
::insertToDefault( $data );
811 throw new MWException( "Unable to store text to external storage" );
816 $flags .= 'external';
819 # Record the text (or external storage URL) to the text table
820 if( !isset( $this->mTextId
) ) {
821 $old_id = $dbw->nextSequenceValue( 'text_old_id_val' );
822 $dbw->insert( 'text',
826 'old_flags' => $flags,
829 $this->mTextId
= $dbw->insertId();
832 # Record the edit in revisions
833 $rev_id = isset( $this->mId
)
835 : $dbw->nextSequenceValue( 'rev_rev_id_val' );
836 $dbw->insert( 'revision',
839 'rev_page' => $this->mPage
,
840 'rev_text_id' => $this->mTextId
,
841 'rev_comment' => $this->mComment
,
842 'rev_minor_edit' => $this->mMinorEdit ?
1 : 0,
843 'rev_user' => $this->mUser
,
844 'rev_user_text' => $this->mUserText
,
845 'rev_timestamp' => $dbw->timestamp( $this->mTimestamp
),
846 'rev_deleted' => $this->mDeleted
,
847 'rev_len' => $this->mSize
,
848 'rev_parent_id' => is_null($this->mParentId
) ?
849 $this->getPreviousRevisionId( $dbw ) : $this->mParentId
853 $this->mId
= !is_null($rev_id) ?
$rev_id : $dbw->insertId();
855 wfRunHooks( 'RevisionInsertComplete', array( &$this, $data, $flags ) );
857 wfProfileOut( __METHOD__
);
862 * Lazy-load the revision's text.
863 * Currently hardcoded to the 'text' table storage engine.
867 private function loadText() {
868 wfProfileIn( __METHOD__
);
870 // Caching may be beneficial for massive use of external storage
871 global $wgRevisionCacheExpiry, $wgMemc;
872 $key = wfMemcKey( 'revisiontext', 'textid', $this->getTextId() );
873 if( $wgRevisionCacheExpiry ) {
874 $text = $wgMemc->get( $key );
875 if( is_string( $text ) ) {
876 wfProfileOut( __METHOD__
);
881 // If we kept data for lazy extraction, use it now...
882 if ( isset( $this->mTextRow
) ) {
883 $row = $this->mTextRow
;
884 $this->mTextRow
= null;
890 // Text data is immutable; check slaves first.
891 $dbr = wfGetDB( DB_SLAVE
);
892 $row = $dbr->selectRow( 'text',
893 array( 'old_text', 'old_flags' ),
894 array( 'old_id' => $this->getTextId() ),
898 if( !$row && wfGetLB()->getServerCount() > 1 ) {
899 // Possible slave lag!
900 $dbw = wfGetDB( DB_MASTER
);
901 $row = $dbw->selectRow( 'text',
902 array( 'old_text', 'old_flags' ),
903 array( 'old_id' => $this->getTextId() ),
907 $text = self
::getRevisionText( $row );
909 # No negative caching -- negative hits on text rows may be due to corrupted slave servers
910 if( $wgRevisionCacheExpiry && $text !== false ) {
911 $wgMemc->set( $key, $text, $wgRevisionCacheExpiry );
914 wfProfileOut( __METHOD__
);
920 * Create a new null-revision for insertion into a page's
921 * history. This will not re-save the text, but simply refer
922 * to the text from the previous version.
924 * Such revisions can for instance identify page rename
925 * operations and other such meta-modifications.
927 * @param Database $dbw
928 * @param int $pageId ID number of the page to read from
929 * @param string $summary
933 public static function newNullRevision( $dbw, $pageId, $summary, $minor ) {
934 wfProfileIn( __METHOD__
);
936 $current = $dbw->selectRow(
937 array( 'page', 'revision' ),
938 array( 'page_latest', 'rev_text_id', 'rev_len' ),
940 'page_id' => $pageId,
941 'page_latest=rev_id',
946 $revision = new Revision( array(
948 'comment' => $summary,
949 'minor_edit' => $minor,
950 'text_id' => $current->rev_text_id
,
951 'parent_id' => $current->page_latest
,
952 'len' => $current->rev_len
958 wfProfileOut( __METHOD__
);
963 * Determine if the current user is allowed to view a particular
964 * field of this revision, if it's marked as deleted.
965 * @param int $field one of self::DELETED_TEXT,
966 * self::DELETED_COMMENT,
970 public function userCan( $field ) {
971 if( ( $this->mDeleted
& $field ) == $field ) {
973 $permission = ( $this->mDeleted
& self
::DELETED_RESTRICTED
) == self
::DELETED_RESTRICTED
976 wfDebug( "Checking for $permission due to $field match on $this->mDeleted\n" );
977 return $wgUser->isAllowed( $permission );
985 * Get rev_timestamp from rev_id, without loading the rest of the row
986 * @param Title $title
989 static function getTimestampFromId( $title, $id ) {
990 $dbr = wfGetDB( DB_SLAVE
);
991 // Casting fix for DB2
995 $conds = array( 'rev_id' => $id );
996 $conds['rev_page'] = $title->getArticleId();
997 $timestamp = $dbr->selectField( 'revision', 'rev_timestamp', $conds, __METHOD__
);
998 if ( $timestamp === false && wfGetLB()->getServerCount() > 1 ) {
999 # Not in slave, try master
1000 $dbw = wfGetDB( DB_MASTER
);
1001 $timestamp = $dbw->selectField( 'revision', 'rev_timestamp', $conds, __METHOD__
);
1003 return wfTimestamp( TS_MW
, $timestamp );
1007 * Get count of revisions per page...not very efficient
1008 * @param Database $db
1009 * @param int $id, page id
1011 static function countByPageId( $db, $id ) {
1012 $row = $db->selectRow( 'revision', 'COUNT(*) AS revCount',
1013 array( 'rev_page' => $id ), __METHOD__
);
1015 return $row->revCount
;
1021 * Get count of revisions per page...not very efficient
1022 * @param Database $db
1023 * @param Title $title
1025 static function countByTitle( $db, $title ) {
1026 $id = $title->getArticleId();
1028 return Revision
::countByPageId( $db, $id );
1035 * Aliases for backwards compatibility with 1.6
1037 define( 'MW_REV_DELETED_TEXT', Revision
::DELETED_TEXT
);
1038 define( 'MW_REV_DELETED_COMMENT', Revision
::DELETED_COMMENT
);
1039 define( 'MW_REV_DELETED_USER', Revision
::DELETED_USER
);
1040 define( 'MW_REV_DELETED_RESTRICTED', Revision
::DELETED_RESTRICTED
);