458b312daad6fc69933efd8f6f76a2ea0b40b314
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 $conds['rev_id'] = $latest;
58 // Use a join to get the latest revision
59 $conds[] = 'rev_id=page_latest';
61 $conds[] = 'page_id=rev_page';
62 return Revision
::newFromConds( $conds );
66 * Load a page revision from a given revision ID number.
67 * Returns null if no such revision can be found.
74 public static function loadFromId( $db, $id ) {
75 return Revision
::loadFromConds( $db,
76 array( 'page_id=rev_page',
77 'rev_id' => intval( $id ) ) );
81 * Load either the current, or a specified, revision
82 * that's attached to a given page. If not attached
83 * to that page, will return null.
92 public static function loadFromPageId( $db, $pageid, $id = 0 ) {
93 $conds=array('page_id=rev_page','rev_page'=>intval( $pageid ), 'page_id'=>intval( $pageid ));
95 $conds['rev_id']=intval($id);
97 $conds[]='rev_id=page_latest';
99 return Revision
::loadFromConds( $db, $conds );
103 * Load either the current, or a specified, revision
104 * that's attached to a given page. If not attached
105 * to that page, will return null.
107 * @param Database $db
108 * @param Title $title
114 public static function loadFromTitle( $db, $title, $id = 0 ) {
116 $matchId = intval( $id );
118 $matchId = 'page_latest';
120 return Revision
::loadFromConds(
122 array( "rev_id=$matchId",
124 'page_namespace' => $title->getNamespace(),
125 'page_title' => $title->getDBkey() ) );
129 * Load the revision for the given title with the given timestamp.
130 * WARNING: Timestamps may in some circumstances not be unique,
131 * so this isn't the best key to use.
133 * @param Database $db
134 * @param Title $title
135 * @param string $timestamp
140 public static function loadFromTimestamp( $db, $title, $timestamp ) {
141 return Revision
::loadFromConds(
143 array( 'rev_timestamp' => $db->timestamp( $timestamp ),
145 'page_namespace' => $title->getNamespace(),
146 'page_title' => $title->getDBkey() ) );
150 * Given a set of conditions, fetch a revision.
152 * @param array $conditions
157 private static function newFromConds( $conditions ) {
158 $db = wfGetDB( DB_SLAVE
);
159 $row = Revision
::loadFromConds( $db, $conditions );
160 if( is_null( $row ) && wfGetLB()->getServerCount() > 1 ) {
161 $dbw = wfGetDB( DB_MASTER
);
162 $row = Revision
::loadFromConds( $dbw, $conditions );
168 * Given a set of conditions, fetch a revision from
169 * the given database connection.
171 * @param Database $db
172 * @param array $conditions
177 private static function loadFromConds( $db, $conditions ) {
178 $res = Revision
::fetchFromConds( $db, $conditions );
180 $row = $res->fetchObject();
183 $ret = new Revision( $row );
192 * Return a wrapper for a series of database rows to
193 * fetch all of a given page's revisions in turn.
194 * Each row can be fed to the constructor to get objects.
196 * @param Title $title
197 * @return ResultWrapper
201 public static function fetchAllRevisions( $title ) {
202 return Revision
::fetchFromConds(
204 array( 'page_namespace' => $title->getNamespace(),
205 'page_title' => $title->getDBkey(),
206 'page_id=rev_page' ) );
210 * Return a wrapper for a series of database rows to
211 * fetch all of a given page's revisions in turn.
212 * Each row can be fed to the constructor to get objects.
214 * @param Title $title
215 * @return ResultWrapper
219 public static function fetchRevision( $title ) {
220 return Revision
::fetchFromConds(
222 array( 'rev_id=page_latest',
223 'page_namespace' => $title->getNamespace(),
224 'page_title' => $title->getDBkey(),
225 'page_id=rev_page' ) );
229 * Given a set of conditions, return a ResultWrapper
230 * which will return matching database rows with the
231 * fields necessary to build Revision objects.
233 * @param Database $db
234 * @param array $conditions
235 * @return ResultWrapper
239 private static function fetchFromConds( $db, $conditions ) {
240 $fields = self
::selectFields();
241 $fields[] = 'page_namespace';
242 $fields[] = 'page_title';
243 $fields[] = 'page_latest';
245 array( 'page', 'revision' ),
249 array( 'LIMIT' => 1 ) );
250 $ret = $db->resultObject( $res );
255 * Return the list of revision fields that should be selected to create
258 static function selectFields() {
275 * Return the list of text fields that should be selected to read the
278 static function selectTextFields() {
285 * Return the list of page fields that should be selected from page table
287 static function selectPageFields() {
299 function Revision( $row ) {
300 if( is_object( $row ) ) {
301 $this->mId
= intval( $row->rev_id
);
302 $this->mPage
= intval( $row->rev_page
);
303 $this->mTextId
= intval( $row->rev_text_id
);
304 $this->mComment
= $row->rev_comment
;
305 $this->mUserText
= $row->rev_user_text
;
306 $this->mUser
= intval( $row->rev_user
);
307 $this->mMinorEdit
= intval( $row->rev_minor_edit
);
308 $this->mTimestamp
= $row->rev_timestamp
;
309 $this->mDeleted
= intval( $row->rev_deleted
);
311 if( !isset( $row->rev_parent_id
) )
312 $this->mParentId
= is_null($row->rev_parent_id
) ?
null : 0;
314 $this->mParentId
= intval( $row->rev_parent_id
);
316 if( !isset( $row->rev_len
) ||
is_null( $row->rev_len
) )
319 $this->mSize
= intval( $row->rev_len
);
321 if( isset( $row->page_latest
) ) {
322 $this->mCurrent
= ( $row->rev_id
== $row->page_latest
);
323 $this->mTitle
= Title
::makeTitle( $row->page_namespace
, $row->page_title
);
324 $this->mTitle
->resetArticleID( $this->mPage
);
326 $this->mCurrent
= false;
327 $this->mTitle
= null;
330 // Lazy extraction...
332 if( isset( $row->old_text
) ) {
333 $this->mTextRow
= $row;
335 // 'text' table row entry will be lazy-loaded
336 $this->mTextRow
= null;
338 } elseif( is_array( $row ) ) {
339 // Build a new revision to be saved...
342 $this->mId
= isset( $row['id'] ) ?
intval( $row['id'] ) : null;
343 $this->mPage
= isset( $row['page'] ) ?
intval( $row['page'] ) : null;
344 $this->mTextId
= isset( $row['text_id'] ) ?
intval( $row['text_id'] ) : null;
345 $this->mUserText
= isset( $row['user_text'] ) ?
strval( $row['user_text'] ) : $wgUser->getName();
346 $this->mUser
= isset( $row['user'] ) ?
intval( $row['user'] ) : $wgUser->getId();
347 $this->mMinorEdit
= isset( $row['minor_edit'] ) ?
intval( $row['minor_edit'] ) : 0;
348 $this->mTimestamp
= isset( $row['timestamp'] ) ?
strval( $row['timestamp'] ) : wfTimestamp( TS_MW
);
349 $this->mDeleted
= isset( $row['deleted'] ) ?
intval( $row['deleted'] ) : 0;
350 $this->mSize
= isset( $row['len'] ) ?
intval( $row['len'] ) : null;
351 $this->mParentId
= isset( $row['parent_id'] ) ?
intval( $row['parent_id'] ) : null;
353 // Enforce spacing trimming on supplied text
354 $this->mComment
= isset( $row['comment'] ) ?
trim( strval( $row['comment'] ) ) : null;
355 $this->mText
= isset( $row['text'] ) ?
rtrim( strval( $row['text'] ) ) : null;
356 $this->mTextRow
= null;
358 $this->mTitle
= null; # Load on demand if needed
359 $this->mCurrent
= false;
360 # If we still have no len_size, see it we have the text to figure it out
362 $this->mSize
= is_null($this->mText
) ?
null : strlen($this->mText
);
364 throw new MWException( 'Revision constructor passed invalid row format.' );
366 $this->mUnpatrolled
= NULL;
377 public function getId() {
385 public function getTextId() {
386 return $this->mTextId
;
390 * Get parent revision ID (the original previous page revision)
393 public function getParentId() {
394 return $this->mParentId
;
398 * Returns the length of the text in this revision, or null if unknown.
401 public function getSize() {
406 * Returns the title of the page associated with this entry.
409 public function getTitle() {
410 if( isset( $this->mTitle
) ) {
411 return $this->mTitle
;
413 $dbr = wfGetDB( DB_SLAVE
);
414 $row = $dbr->selectRow(
415 array( 'page', 'revision' ),
416 array( 'page_namespace', 'page_title' ),
417 array( 'page_id=rev_page',
418 'rev_id' => $this->mId
),
419 'Revision::getTitle' );
421 $this->mTitle
= Title
::makeTitle( $row->page_namespace
,
424 return $this->mTitle
;
428 * Set the title of the revision
429 * @param Title $title
431 public function setTitle( $title ) {
432 $this->mTitle
= $title;
439 public function getPage() {
444 * Fetch revision's user id if it's available to the specified audience.
445 * If the specified audience does not have access to it, zero will be
448 * @param integer $audience One of:
449 * Revision::FOR_PUBLIC to be displayed to all users
450 * Revision::FOR_THIS_USER to be displayed to $wgUser
451 * Revision::RAW get the ID regardless of permissions
456 public function getUser( $audience = self
::FOR_PUBLIC
) {
457 if( $audience == self
::FOR_PUBLIC
&& $this->isDeleted( self
::DELETED_USER
) ) {
459 } elseif( $audience == self
::FOR_THIS_USER
&& !$this->userCan( self
::DELETED_USER
) ) {
467 * Fetch revision's user id without regard for the current user's permissions
470 public function getRawUser() {
475 * Fetch revision's username if it's available to the specified audience.
476 * If the specified audience does not have access to the username, an
477 * empty string will be returned.
479 * @param integer $audience One of:
480 * Revision::FOR_PUBLIC to be displayed to all users
481 * Revision::FOR_THIS_USER to be displayed to $wgUser
482 * Revision::RAW get the text regardless of permissions
486 public function getUserText( $audience = self
::FOR_PUBLIC
) {
487 if( $audience == self
::FOR_PUBLIC
&& $this->isDeleted( self
::DELETED_USER
) ) {
489 } elseif( $audience == self
::FOR_THIS_USER
&& !$this->userCan( self
::DELETED_USER
) ) {
492 return $this->mUserText
;
497 * Fetch revision's username without regard for view restrictions
500 public function getRawUserText() {
501 return $this->mUserText
;
505 * Fetch revision comment if it's available to the specified audience.
506 * If the specified audience does not have access to the comment, an
507 * empty string will be returned.
509 * @param integer $audience One of:
510 * Revision::FOR_PUBLIC to be displayed to all users
511 * Revision::FOR_THIS_USER to be displayed to $wgUser
512 * Revision::RAW get the text regardless of permissions
516 function getComment( $audience = self
::FOR_PUBLIC
) {
517 if( $audience == self
::FOR_PUBLIC
&& $this->isDeleted( self
::DELETED_COMMENT
) ) {
519 } elseif( $audience == self
::FOR_THIS_USER
&& !$this->userCan( self
::DELETED_COMMENT
) ) {
522 return $this->mComment
;
527 * Fetch revision comment without regard for the current user's permissions
530 public function getRawComment() {
531 return $this->mComment
;
537 public function isMinor() {
538 return (bool)$this->mMinorEdit
;
542 * @return int rcid of the unpatrolled row, zero if there isn't one
544 public function isUnpatrolled() {
545 if( $this->mUnpatrolled
!== NULL ) {
546 return $this->mUnpatrolled
;
548 $dbr = wfGetDB( DB_SLAVE
);
549 $this->mUnpatrolled
= $dbr->selectField( 'recentchanges',
551 array( // Add redundant user,timestamp condition so we can use the existing index
552 'rc_user_text' => $this->getRawUserText(),
553 'rc_timestamp' => $dbr->timestamp( $this->getTimestamp() ),
554 'rc_this_oldid' => $this->getId(),
559 return (int)$this->mUnpatrolled
;
563 * int $field one of DELETED_* bitfield constants
566 public function isDeleted( $field ) {
567 return ($this->mDeleted
& $field) == $field;
571 * Get the deletion bitfield of the revision
573 public function getVisibility() {
574 return (int)$this->mDeleted
;
578 * Fetch revision text if it's available to the specified audience.
579 * If the specified audience does not have the ability to view this
580 * revision, an empty string will be returned.
582 * @param integer $audience One of:
583 * Revision::FOR_PUBLIC to be displayed to all users
584 * Revision::FOR_THIS_USER to be displayed to $wgUser
585 * Revision::RAW get the text regardless of permissions
590 public function getText( $audience = self
::FOR_PUBLIC
) {
591 if( $audience == self
::FOR_PUBLIC
&& $this->isDeleted( self
::DELETED_TEXT
) ) {
593 } elseif( $audience == self
::FOR_THIS_USER
&& !$this->userCan( self
::DELETED_TEXT
) ) {
596 return $this->getRawText();
601 * Alias for getText(Revision::FOR_THIS_USER)
603 public function revText() {
604 return $this->getText( self
::FOR_THIS_USER
);
608 * Fetch revision text without regard for view restrictions
611 public function getRawText() {
612 if( is_null( $this->mText
) ) {
613 // Revision text is immutable. Load on demand:
614 $this->mText
= $this->loadText();
622 public function getTimestamp() {
623 return wfTimestamp(TS_MW
, $this->mTimestamp
);
629 public function isCurrent() {
630 return $this->mCurrent
;
634 * Get previous revision for this title
637 public function getPrevious() {
638 if( $this->getTitle() ) {
639 $prev = $this->getTitle()->getPreviousRevisionID( $this->getId() );
641 return Revision
::newFromTitle( $this->getTitle(), $prev );
650 public function getNext() {
651 if( $this->getTitle() ) {
652 $next = $this->getTitle()->getNextRevisionID( $this->getId() );
654 return Revision
::newFromTitle( $this->getTitle(), $next );
661 * Get previous revision Id for this page_id
662 * This is used to populate rev_parent_id on save
663 * @param Database $db
666 private function getPreviousRevisionId( $db ) {
667 if( is_null($this->mPage
) ) {
670 # Use page_latest if ID is not given
672 $prevId = $db->selectField( 'page', 'page_latest',
673 array( 'page_id' => $this->mPage
),
676 $prevId = $db->selectField( 'revision', 'rev_id',
677 array( 'rev_page' => $this->mPage
, 'rev_id < ' . $this->mId
),
679 array( 'ORDER BY' => 'rev_id DESC' ) );
681 return intval($prevId);
685 * Get revision text associated with an old or archive row
686 * $row is usually an object from wfFetchRow(), both the flags and the text
687 * field must be included
689 * @param object $row The text data
690 * @param string $prefix table prefix (default 'old_')
691 * @return string $text|false the text requested
693 public static function getRevisionText( $row, $prefix = 'old_' ) {
694 wfProfileIn( __METHOD__
);
697 $textField = $prefix . 'text';
698 $flagsField = $prefix . 'flags';
700 if( isset( $row->$flagsField ) ) {
701 $flags = explode( ',', $row->$flagsField );
706 if( isset( $row->$textField ) ) {
707 $text = $row->$textField;
709 wfProfileOut( __METHOD__
);
713 # Use external methods for external objects, text in table is URL-only then
714 if ( in_array( 'external', $flags ) ) {
716 @list
(/* $proto */,$path)=explode('://',$url,2);
718 wfProfileOut( __METHOD__
);
721 $text=ExternalStore
::fetchFromURL($url);
724 // If the text was fetched without an error, convert it
725 if ( $text !== false ) {
726 if( in_array( 'gzip', $flags ) ) {
727 # Deal with optional compression of archived pages.
728 # This can be done periodically via maintenance/compressOld.php, and
729 # as pages are saved if $wgCompressRevisions is set.
730 $text = gzinflate( $text );
733 if( in_array( 'object', $flags ) ) {
734 # Generic compressed storage
735 $obj = unserialize( $text );
736 if ( !is_object( $obj ) ) {
738 wfProfileOut( __METHOD__
);
741 $text = $obj->getText();
744 global $wgLegacyEncoding;
745 if( $wgLegacyEncoding && !in_array( 'utf-8', $flags ) && !in_array( 'utf8', $flags ) ) {
746 # Old revisions kept around in a legacy encoding?
747 # Upconvert on demand.
748 # ("utf8" checked for compatibility with some broken
749 # conversion scripts 2008-12-30)
750 global $wgInputEncoding, $wgContLang;
751 $text = $wgContLang->iconv( $wgLegacyEncoding, $wgInputEncoding, $text );
754 wfProfileOut( __METHOD__
);
759 * If $wgCompressRevisions is enabled, we will compress data.
760 * The input string is modified in place.
761 * Return value is the flags field: contains 'gzip' if the
762 * data is compressed, and 'utf-8' if we're saving in UTF-8
765 * @param mixed $text reference to a text
768 public static function compressRevisionText( &$text ) {
769 global $wgCompressRevisions;
772 # Revisions not marked this way will be converted
773 # on load if $wgLegacyCharset is set in the future.
776 if( $wgCompressRevisions ) {
777 if( function_exists( 'gzdeflate' ) ) {
778 $text = gzdeflate( $text );
781 wfDebug( "Revision::compressRevisionText() -- no zlib support, not compressing\n" );
784 return implode( ',', $flags );
788 * Insert a new revision into the database, returning the new revision ID
789 * number on success and dies horribly on failure.
791 * @param Database $dbw
794 public function insertOn( $dbw ) {
795 global $wgDefaultExternalStore;
797 wfProfileIn( __METHOD__
);
799 $data = $this->mText
;
800 $flags = Revision
::compressRevisionText( $data );
802 # Write to external storage if required
803 if( $wgDefaultExternalStore ) {
804 // Store and get the URL
805 $data = ExternalStore
::insertToDefault( $data );
807 throw new MWException( "Unable to store text to external storage" );
812 $flags .= 'external';
815 # Record the text (or external storage URL) to the text table
816 if( !isset( $this->mTextId
) ) {
817 $old_id = $dbw->nextSequenceValue( 'text_old_id_val' );
818 $dbw->insert( 'text',
822 'old_flags' => $flags,
825 $this->mTextId
= $dbw->insertId();
828 # Record the edit in revisions
829 $rev_id = isset( $this->mId
)
831 : $dbw->nextSequenceValue( 'rev_rev_id_val' );
832 $dbw->insert( 'revision',
835 'rev_page' => $this->mPage
,
836 'rev_text_id' => $this->mTextId
,
837 'rev_comment' => $this->mComment
,
838 'rev_minor_edit' => $this->mMinorEdit ?
1 : 0,
839 'rev_user' => $this->mUser
,
840 'rev_user_text' => $this->mUserText
,
841 'rev_timestamp' => $dbw->timestamp( $this->mTimestamp
),
842 'rev_deleted' => $this->mDeleted
,
843 'rev_len' => $this->mSize
,
844 'rev_parent_id' => is_null($this->mParentId
) ?
845 $this->getPreviousRevisionId( $dbw ) : $this->mParentId
849 $this->mId
= !is_null($rev_id) ?
$rev_id : $dbw->insertId();
851 wfRunHooks( 'RevisionInsertComplete', array( &$this, $data, $flags ) );
853 wfProfileOut( __METHOD__
);
858 * Lazy-load the revision's text.
859 * Currently hardcoded to the 'text' table storage engine.
863 private function loadText() {
864 wfProfileIn( __METHOD__
);
866 // Caching may be beneficial for massive use of external storage
867 global $wgRevisionCacheExpiry, $wgMemc;
868 $key = wfMemcKey( 'revisiontext', 'textid', $this->getTextId() );
869 if( $wgRevisionCacheExpiry ) {
870 $text = $wgMemc->get( $key );
871 if( is_string( $text ) ) {
872 wfProfileOut( __METHOD__
);
877 // If we kept data for lazy extraction, use it now...
878 if ( isset( $this->mTextRow
) ) {
879 $row = $this->mTextRow
;
880 $this->mTextRow
= null;
886 // Text data is immutable; check slaves first.
887 $dbr = wfGetDB( DB_SLAVE
);
888 $row = $dbr->selectRow( 'text',
889 array( 'old_text', 'old_flags' ),
890 array( 'old_id' => $this->getTextId() ),
894 if( !$row && wfGetLB()->getServerCount() > 1 ) {
895 // Possible slave lag!
896 $dbw = wfGetDB( DB_MASTER
);
897 $row = $dbw->selectRow( 'text',
898 array( 'old_text', 'old_flags' ),
899 array( 'old_id' => $this->getTextId() ),
903 $text = self
::getRevisionText( $row );
905 # No negative caching -- negative hits on text rows may be due to corrupted slave servers
906 if( $wgRevisionCacheExpiry && $text !== false ) {
907 $wgMemc->set( $key, $text, $wgRevisionCacheExpiry );
910 wfProfileOut( __METHOD__
);
916 * Create a new null-revision for insertion into a page's
917 * history. This will not re-save the text, but simply refer
918 * to the text from the previous version.
920 * Such revisions can for instance identify page rename
921 * operations and other such meta-modifications.
923 * @param Database $dbw
924 * @param int $pageId ID number of the page to read from
925 * @param string $summary
929 public static function newNullRevision( $dbw, $pageId, $summary, $minor ) {
930 wfProfileIn( __METHOD__
);
932 $current = $dbw->selectRow(
933 array( 'page', 'revision' ),
934 array( 'page_latest', 'rev_text_id', 'rev_len' ),
936 'page_id' => $pageId,
937 'page_latest=rev_id',
942 $revision = new Revision( array(
944 'comment' => $summary,
945 'minor_edit' => $minor,
946 'text_id' => $current->rev_text_id
,
947 'parent_id' => $current->page_latest
,
948 'len' => $current->rev_len
954 wfProfileOut( __METHOD__
);
959 * Determine if the current user is allowed to view a particular
960 * field of this revision, if it's marked as deleted.
961 * @param int $field one of self::DELETED_TEXT,
962 * self::DELETED_COMMENT,
966 public function userCan( $field ) {
967 if( ( $this->mDeleted
& $field ) == $field ) {
969 $permission = ( $this->mDeleted
& self
::DELETED_RESTRICTED
) == self
::DELETED_RESTRICTED
972 wfDebug( "Checking for $permission due to $field match on $this->mDeleted\n" );
973 return $wgUser->isAllowed( $permission );
981 * Get rev_timestamp from rev_id, without loading the rest of the row
982 * @param Title $title
985 static function getTimestampFromId( $title, $id ) {
986 $dbr = wfGetDB( DB_SLAVE
);
987 // Casting fix for DB2
991 $conds = array( 'rev_id' => $id );
992 $conds['rev_page'] = $title->getArticleId();
993 $timestamp = $dbr->selectField( 'revision', 'rev_timestamp', $conds, __METHOD__
);
994 if ( $timestamp === false && wfGetLB()->getServerCount() > 1 ) {
995 # Not in slave, try master
996 $dbw = wfGetDB( DB_MASTER
);
997 $timestamp = $dbw->selectField( 'revision', 'rev_timestamp', $conds, __METHOD__
);
999 return wfTimestamp( TS_MW
, $timestamp );
1003 * Get count of revisions per page...not very efficient
1004 * @param Database $db
1005 * @param int $id, page id
1007 static function countByPageId( $db, $id ) {
1008 $row = $db->selectRow( 'revision', 'COUNT(*) AS revCount',
1009 array( 'rev_page' => $id ), __METHOD__
);
1011 return $row->revCount
;
1017 * Get count of revisions per page...not very efficient
1018 * @param Database $db
1019 * @param Title $title
1021 static function countByTitle( $db, $title ) {
1022 $id = $title->getArticleId();
1024 return Revision
::countByPageId( $db, $id );
1031 * Aliases for backwards compatibility with 1.6
1033 define( 'MW_REV_DELETED_TEXT', Revision
::DELETED_TEXT
);
1034 define( 'MW_REV_DELETED_COMMENT', Revision
::DELETED_COMMENT
);
1035 define( 'MW_REV_DELETED_USER', Revision
::DELETED_USER
);
1036 define( 'MW_REV_DELETED_RESTRICTED', Revision
::DELETED_RESTRICTED
);