00001 <?php
00010 class Revision {
00011 const DELETED_TEXT = 1;
00012 const DELETED_COMMENT = 2;
00013 const DELETED_USER = 4;
00014 const DELETED_RESTRICTED = 8;
00015
00016
00017 const FOR_PUBLIC = 1;
00018 const FOR_THIS_USER = 2;
00019 const RAW = 3;
00020
00029 public static function newFromId( $id ) {
00030 return Revision::newFromConds(
00031 array( 'page_id=rev_page',
00032 'rev_id' => intval( $id ) ) );
00033 }
00034
00044 public static function newFromTitle( $title, $id = 0 ) {
00045 $conds = array(
00046 'page_namespace' => $title->getNamespace(),
00047 'page_title' => $title->getDBkey()
00048 );
00049 if ( $id ) {
00050
00051 $conds['rev_id'] = $id;
00052 } elseif ( wfGetLB()->getServerCount() > 1 ) {
00053
00054 $dbw = wfGetDB( DB_MASTER );
00055 $latest = $dbw->selectField( 'page', 'page_latest', $conds, __METHOD__ );
00056 if ( $latest === false ) {
00057
00058 return null;
00059 }
00060 $conds['rev_id'] = $latest;
00061 } else {
00062
00063 $conds[] = 'rev_id=page_latest';
00064 }
00065 $conds[] = 'page_id=rev_page';
00066 return Revision::newFromConds( $conds );
00067 }
00068
00078 public static function loadFromId( $db, $id ) {
00079 return Revision::loadFromConds( $db,
00080 array( 'page_id=rev_page',
00081 'rev_id' => intval( $id ) ) );
00082 }
00083
00096 public static function loadFromPageId( $db, $pageid, $id = 0 ) {
00097 $conds=array('page_id=rev_page','rev_page'=>intval( $pageid ), 'page_id'=>intval( $pageid ));
00098 if( $id ) {
00099 $conds['rev_id']=intval($id);
00100 } else {
00101 $conds[]='rev_id=page_latest';
00102 }
00103 return Revision::loadFromConds( $db, $conds );
00104 }
00105
00118 public static function loadFromTitle( $db, $title, $id = 0 ) {
00119 if( $id ) {
00120 $matchId = intval( $id );
00121 } else {
00122 $matchId = 'page_latest';
00123 }
00124 return Revision::loadFromConds(
00125 $db,
00126 array( "rev_id=$matchId",
00127 'page_id=rev_page',
00128 'page_namespace' => $title->getNamespace(),
00129 'page_title' => $title->getDBkey() ) );
00130 }
00131
00144 public static function loadFromTimestamp( $db, $title, $timestamp ) {
00145 return Revision::loadFromConds(
00146 $db,
00147 array( 'rev_timestamp' => $db->timestamp( $timestamp ),
00148 'page_id=rev_page',
00149 'page_namespace' => $title->getNamespace(),
00150 'page_title' => $title->getDBkey() ) );
00151 }
00152
00161 private static function newFromConds( $conditions ) {
00162 $db = wfGetDB( DB_SLAVE );
00163 $row = Revision::loadFromConds( $db, $conditions );
00164 if( is_null( $row ) && wfGetLB()->getServerCount() > 1 ) {
00165 $dbw = wfGetDB( DB_MASTER );
00166 $row = Revision::loadFromConds( $dbw, $conditions );
00167 }
00168 return $row;
00169 }
00170
00181 private static function loadFromConds( $db, $conditions ) {
00182 $res = Revision::fetchFromConds( $db, $conditions );
00183 if( $res ) {
00184 $row = $res->fetchObject();
00185 $res->free();
00186 if( $row ) {
00187 $ret = new Revision( $row );
00188 return $ret;
00189 }
00190 }
00191 $ret = null;
00192 return $ret;
00193 }
00194
00205 public static function fetchAllRevisions( $title ) {
00206 return Revision::fetchFromConds(
00207 wfGetDB( DB_SLAVE ),
00208 array( 'page_namespace' => $title->getNamespace(),
00209 'page_title' => $title->getDBkey(),
00210 'page_id=rev_page' ) );
00211 }
00212
00223 public static function fetchRevision( $title ) {
00224 return Revision::fetchFromConds(
00225 wfGetDB( DB_SLAVE ),
00226 array( 'rev_id=page_latest',
00227 'page_namespace' => $title->getNamespace(),
00228 'page_title' => $title->getDBkey(),
00229 'page_id=rev_page' ) );
00230 }
00231
00243 private static function fetchFromConds( $db, $conditions ) {
00244 $fields = self::selectFields();
00245 $fields[] = 'page_namespace';
00246 $fields[] = 'page_title';
00247 $fields[] = 'page_latest';
00248 $res = $db->select(
00249 array( 'page', 'revision' ),
00250 $fields,
00251 $conditions,
00252 __METHOD__,
00253 array( 'LIMIT' => 1 ) );
00254 $ret = $db->resultObject( $res );
00255 return $ret;
00256 }
00257
00262 static function selectFields() {
00263 return array(
00264 'rev_id',
00265 'rev_page',
00266 'rev_text_id',
00267 'rev_timestamp',
00268 'rev_comment',
00269 'rev_user_text,'.
00270 'rev_user',
00271 'rev_minor_edit',
00272 'rev_deleted',
00273 'rev_len',
00274 'rev_parent_id'
00275 );
00276 }
00277
00282 static function selectTextFields() {
00283 return array(
00284 'old_text',
00285 'old_flags'
00286 );
00287 }
00291 static function selectPageFields() {
00292 return array(
00293 'page_namespace',
00294 'page_title',
00295 'page_latest'
00296 );
00297 }
00298
00303 function Revision( $row ) {
00304 if( is_object( $row ) ) {
00305 $this->mId = intval( $row->rev_id );
00306 $this->mPage = intval( $row->rev_page );
00307 $this->mTextId = intval( $row->rev_text_id );
00308 $this->mComment = $row->rev_comment;
00309 $this->mUserText = $row->rev_user_text;
00310 $this->mUser = intval( $row->rev_user );
00311 $this->mMinorEdit = intval( $row->rev_minor_edit );
00312 $this->mTimestamp = $row->rev_timestamp;
00313 $this->mDeleted = intval( $row->rev_deleted );
00314
00315 if( !isset( $row->rev_parent_id ) )
00316 $this->mParentId = is_null($row->rev_parent_id) ? null : 0;
00317 else
00318 $this->mParentId = intval( $row->rev_parent_id );
00319
00320 if( !isset( $row->rev_len ) || is_null( $row->rev_len ) )
00321 $this->mSize = null;
00322 else
00323 $this->mSize = intval( $row->rev_len );
00324
00325 if( isset( $row->page_latest ) ) {
00326 $this->mCurrent = ( $row->rev_id == $row->page_latest );
00327 $this->mTitle = Title::makeTitle( $row->page_namespace, $row->page_title );
00328 $this->mTitle->resetArticleID( $this->mPage );
00329 } else {
00330 $this->mCurrent = false;
00331 $this->mTitle = null;
00332 }
00333
00334
00335 $this->mText = null;
00336 if( isset( $row->old_text ) ) {
00337 $this->mTextRow = $row;
00338 } else {
00339
00340 $this->mTextRow = null;
00341 }
00342 } elseif( is_array( $row ) ) {
00343
00344 global $wgUser;
00345
00346 $this->mId = isset( $row['id'] ) ? intval( $row['id'] ) : null;
00347 $this->mPage = isset( $row['page'] ) ? intval( $row['page'] ) : null;
00348 $this->mTextId = isset( $row['text_id'] ) ? intval( $row['text_id'] ) : null;
00349 $this->mUserText = isset( $row['user_text'] ) ? strval( $row['user_text'] ) : $wgUser->getName();
00350 $this->mUser = isset( $row['user'] ) ? intval( $row['user'] ) : $wgUser->getId();
00351 $this->mMinorEdit = isset( $row['minor_edit'] ) ? intval( $row['minor_edit'] ) : 0;
00352 $this->mTimestamp = isset( $row['timestamp'] ) ? strval( $row['timestamp'] ) : wfTimestamp( TS_MW );
00353 $this->mDeleted = isset( $row['deleted'] ) ? intval( $row['deleted'] ) : 0;
00354 $this->mSize = isset( $row['len'] ) ? intval( $row['len'] ) : null;
00355 $this->mParentId = isset( $row['parent_id'] ) ? intval( $row['parent_id'] ) : null;
00356
00357
00358 $this->mComment = isset( $row['comment'] ) ? trim( strval( $row['comment'] ) ) : null;
00359 $this->mText = isset( $row['text'] ) ? rtrim( strval( $row['text'] ) ) : null;
00360 $this->mTextRow = null;
00361
00362 $this->mTitle = null; # Load on demand if needed
00363 $this->mCurrent = false;
00364 # If we still have no len_size, see it we have the text to figure it out
00365 if ( !$this->mSize )
00366 $this->mSize = is_null($this->mText) ? null : strlen($this->mText);
00367 } else {
00368 throw new MWException( 'Revision constructor passed invalid row format.' );
00369 }
00370 $this->mUnpatrolled = NULL;
00371 }
00372
00381 public function getId() {
00382 return $this->mId;
00383 }
00384
00389 public function getTextId() {
00390 return $this->mTextId;
00391 }
00392
00397 public function getParentId() {
00398 return $this->mParentId;
00399 }
00400
00405 public function getSize() {
00406 return $this->mSize;
00407 }
00408
00413 public function getTitle() {
00414 if( isset( $this->mTitle ) ) {
00415 return $this->mTitle;
00416 }
00417 $dbr = wfGetDB( DB_SLAVE );
00418 $row = $dbr->selectRow(
00419 array( 'page', 'revision' ),
00420 array( 'page_namespace', 'page_title' ),
00421 array( 'page_id=rev_page',
00422 'rev_id' => $this->mId ),
00423 'Revision::getTitle' );
00424 if( $row ) {
00425 $this->mTitle = Title::makeTitle( $row->page_namespace,
00426 $row->page_title );
00427 }
00428 return $this->mTitle;
00429 }
00430
00435 public function setTitle( $title ) {
00436 $this->mTitle = $title;
00437 }
00438
00443 public function getPage() {
00444 return $this->mPage;
00445 }
00446
00460 public function getUser( $audience = self::FOR_PUBLIC ) {
00461 if( $audience == self::FOR_PUBLIC && $this->isDeleted( self::DELETED_USER ) ) {
00462 return 0;
00463 } elseif( $audience == self::FOR_THIS_USER && !$this->userCan( self::DELETED_USER ) ) {
00464 return 0;
00465 } else {
00466 return $this->mUser;
00467 }
00468 }
00469
00474 public function getRawUser() {
00475 return $this->mUser;
00476 }
00477
00490 public function getUserText( $audience = self::FOR_PUBLIC ) {
00491 if( $audience == self::FOR_PUBLIC && $this->isDeleted( self::DELETED_USER ) ) {
00492 return "";
00493 } elseif( $audience == self::FOR_THIS_USER && !$this->userCan( self::DELETED_USER ) ) {
00494 return "";
00495 } else {
00496 return $this->mUserText;
00497 }
00498 }
00499
00504 public function getRawUserText() {
00505 return $this->mUserText;
00506 }
00507
00520 function getComment( $audience = self::FOR_PUBLIC ) {
00521 if( $audience == self::FOR_PUBLIC && $this->isDeleted( self::DELETED_COMMENT ) ) {
00522 return "";
00523 } elseif( $audience == self::FOR_THIS_USER && !$this->userCan( self::DELETED_COMMENT ) ) {
00524 return "";
00525 } else {
00526 return $this->mComment;
00527 }
00528 }
00529
00534 public function getRawComment() {
00535 return $this->mComment;
00536 }
00537
00541 public function isMinor() {
00542 return (bool)$this->mMinorEdit;
00543 }
00544
00548 public function isUnpatrolled() {
00549 if( $this->mUnpatrolled !== NULL ) {
00550 return $this->mUnpatrolled;
00551 }
00552 $dbr = wfGetDB( DB_SLAVE );
00553 $this->mUnpatrolled = $dbr->selectField( 'recentchanges',
00554 'rc_id',
00555 array(
00556 'rc_user_text' => $this->getRawUserText(),
00557 'rc_timestamp' => $dbr->timestamp( $this->getTimestamp() ),
00558 'rc_this_oldid' => $this->getId(),
00559 'rc_patrolled' => 0
00560 ),
00561 __METHOD__
00562 );
00563 return (int)$this->mUnpatrolled;
00564 }
00565
00570 public function isDeleted( $field ) {
00571 return ($this->mDeleted & $field) == $field;
00572 }
00573
00577 public function getVisibility() {
00578 return (int)$this->mDeleted;
00579 }
00580
00594 public function getText( $audience = self::FOR_PUBLIC ) {
00595 if( $audience == self::FOR_PUBLIC && $this->isDeleted( self::DELETED_TEXT ) ) {
00596 return "";
00597 } elseif( $audience == self::FOR_THIS_USER && !$this->userCan( self::DELETED_TEXT ) ) {
00598 return "";
00599 } else {
00600 return $this->getRawText();
00601 }
00602 }
00603
00607 public function revText() {
00608 return $this->getText( self::FOR_THIS_USER );
00609 }
00610
00615 public function getRawText() {
00616 if( is_null( $this->mText ) ) {
00617
00618 $this->mText = $this->loadText();
00619 }
00620 return $this->mText;
00621 }
00622
00626 public function getTimestamp() {
00627 return wfTimestamp(TS_MW, $this->mTimestamp);
00628 }
00629
00633 public function isCurrent() {
00634 return $this->mCurrent;
00635 }
00636
00641 public function getPrevious() {
00642 if( $this->getTitle() ) {
00643 $prev = $this->getTitle()->getPreviousRevisionID( $this->getId() );
00644 if( $prev ) {
00645 return Revision::newFromTitle( $this->getTitle(), $prev );
00646 }
00647 }
00648 return null;
00649 }
00650
00654 public function getNext() {
00655 if( $this->getTitle() ) {
00656 $next = $this->getTitle()->getNextRevisionID( $this->getId() );
00657 if ( $next ) {
00658 return Revision::newFromTitle( $this->getTitle(), $next );
00659 }
00660 }
00661 return null;
00662 }
00663
00670 private function getPreviousRevisionId( $db ) {
00671 if( is_null($this->mPage) ) {
00672 return 0;
00673 }
00674 # Use page_latest if ID is not given
00675 if( !$this->mId ) {
00676 $prevId = $db->selectField( 'page', 'page_latest',
00677 array( 'page_id' => $this->mPage ),
00678 __METHOD__ );
00679 } else {
00680 $prevId = $db->selectField( 'revision', 'rev_id',
00681 array( 'rev_page' => $this->mPage, 'rev_id < ' . $this->mId ),
00682 __METHOD__,
00683 array( 'ORDER BY' => 'rev_id DESC' ) );
00684 }
00685 return intval($prevId);
00686 }
00687
00697 public static function getRevisionText( $row, $prefix = 'old_' ) {
00698 wfProfileIn( __METHOD__ );
00699
00700 # Get data
00701 $textField = $prefix . 'text';
00702 $flagsField = $prefix . 'flags';
00703
00704 if( isset( $row->$flagsField ) ) {
00705 $flags = explode( ',', $row->$flagsField );
00706 } else {
00707 $flags = array();
00708 }
00709
00710 if( isset( $row->$textField ) ) {
00711 $text = $row->$textField;
00712 } else {
00713 wfProfileOut( __METHOD__ );
00714 return false;
00715 }
00716
00717 # Use external methods for external objects, text in table is URL-only then
00718 if ( in_array( 'external', $flags ) ) {
00719 $url=$text;
00720 @list(,$path)=explode('://',$url,2);
00721 if ($path=="") {
00722 wfProfileOut( __METHOD__ );
00723 return false;
00724 }
00725 $text=ExternalStore::fetchFromURL($url);
00726 }
00727
00728
00729 if ( $text !== false ) {
00730 if( in_array( 'gzip', $flags ) ) {
00731 # Deal with optional compression of archived pages.
00732 # This can be done periodically via maintenance/compressOld.php, and
00733 # as pages are saved if $wgCompressRevisions is set.
00734 $text = gzinflate( $text );
00735 }
00736
00737 if( in_array( 'object', $flags ) ) {
00738 # Generic compressed storage
00739 $obj = unserialize( $text );
00740 if ( !is_object( $obj ) ) {
00741
00742 wfProfileOut( __METHOD__ );
00743 return false;
00744 }
00745 $text = $obj->getText();
00746 }
00747
00748 global $wgLegacyEncoding;
00749 if( $wgLegacyEncoding && !in_array( 'utf-8', $flags ) && !in_array( 'utf8', $flags ) ) {
00750 # Old revisions kept around in a legacy encoding?
00751 # Upconvert on demand.
00752 # ("utf8" checked for compatibility with some broken
00753 # conversion scripts 2008-12-30)
00754 global $wgInputEncoding, $wgContLang;
00755 $text = $wgContLang->iconv( $wgLegacyEncoding, $wgInputEncoding, $text );
00756 }
00757 }
00758 wfProfileOut( __METHOD__ );
00759 return $text;
00760 }
00761
00772 public static function compressRevisionText( &$text ) {
00773 global $wgCompressRevisions;
00774 $flags = array();
00775
00776 # Revisions not marked this way will be converted
00777 # on load if $wgLegacyCharset is set in the future.
00778 $flags[] = 'utf-8';
00779
00780 if( $wgCompressRevisions ) {
00781 if( function_exists( 'gzdeflate' ) ) {
00782 $text = gzdeflate( $text );
00783 $flags[] = 'gzip';
00784 } else {
00785 wfDebug( "Revision::compressRevisionText() -- no zlib support, not compressing\n" );
00786 }
00787 }
00788 return implode( ',', $flags );
00789 }
00790
00798 public function insertOn( $dbw ) {
00799 global $wgDefaultExternalStore;
00800
00801 wfProfileIn( __METHOD__ );
00802
00803 $data = $this->mText;
00804 $flags = Revision::compressRevisionText( $data );
00805
00806 # Write to external storage if required
00807 if( $wgDefaultExternalStore ) {
00808
00809 $data = ExternalStore::insertToDefault( $data );
00810 if( !$data ) {
00811 throw new MWException( "Unable to store text to external storage" );
00812 }
00813 if( $flags ) {
00814 $flags .= ',';
00815 }
00816 $flags .= 'external';
00817 }
00818
00819 # Record the text (or external storage URL) to the text table
00820 if( !isset( $this->mTextId ) ) {
00821 $old_id = $dbw->nextSequenceValue( 'text_old_id_val' );
00822 $dbw->insert( 'text',
00823 array(
00824 'old_id' => $old_id,
00825 'old_text' => $data,
00826 'old_flags' => $flags,
00827 ), __METHOD__
00828 );
00829 $this->mTextId = $dbw->insertId();
00830 }
00831
00832 # Record the edit in revisions
00833 $rev_id = isset( $this->mId )
00834 ? $this->mId
00835 : $dbw->nextSequenceValue( 'rev_rev_id_val' );
00836 $dbw->insert( 'revision',
00837 array(
00838 'rev_id' => $rev_id,
00839 'rev_page' => $this->mPage,
00840 'rev_text_id' => $this->mTextId,
00841 'rev_comment' => $this->mComment,
00842 'rev_minor_edit' => $this->mMinorEdit ? 1 : 0,
00843 'rev_user' => $this->mUser,
00844 'rev_user_text' => $this->mUserText,
00845 'rev_timestamp' => $dbw->timestamp( $this->mTimestamp ),
00846 'rev_deleted' => $this->mDeleted,
00847 'rev_len' => $this->mSize,
00848 'rev_parent_id' => is_null($this->mParentId) ?
00849 $this->getPreviousRevisionId( $dbw ) : $this->mParentId
00850 ), __METHOD__
00851 );
00852
00853 $this->mId = !is_null($rev_id) ? $rev_id : $dbw->insertId();
00854
00855 wfRunHooks( 'RevisionInsertComplete', array( &$this, $data, $flags ) );
00856
00857 wfProfileOut( __METHOD__ );
00858 return $this->mId;
00859 }
00860
00867 private function loadText() {
00868 wfProfileIn( __METHOD__ );
00869
00870
00871 global $wgRevisionCacheExpiry, $wgMemc;
00872 $key = wfMemcKey( 'revisiontext', 'textid', $this->getTextId() );
00873 if( $wgRevisionCacheExpiry ) {
00874 $text = $wgMemc->get( $key );
00875 if( is_string( $text ) ) {
00876 wfProfileOut( __METHOD__ );
00877 return $text;
00878 }
00879 }
00880
00881
00882 if ( isset( $this->mTextRow ) ) {
00883 $row = $this->mTextRow;
00884 $this->mTextRow = null;
00885 } else {
00886 $row = null;
00887 }
00888
00889 if( !$row ) {
00890
00891 $dbr = wfGetDB( DB_SLAVE );
00892 $row = $dbr->selectRow( 'text',
00893 array( 'old_text', 'old_flags' ),
00894 array( 'old_id' => $this->getTextId() ),
00895 __METHOD__ );
00896 }
00897
00898 if( !$row && wfGetLB()->getServerCount() > 1 ) {
00899
00900 $dbw = wfGetDB( DB_MASTER );
00901 $row = $dbw->selectRow( 'text',
00902 array( 'old_text', 'old_flags' ),
00903 array( 'old_id' => $this->getTextId() ),
00904 __METHOD__ );
00905 }
00906
00907 $text = self::getRevisionText( $row );
00908
00909 # No negative caching -- negative hits on text rows may be due to corrupted slave servers
00910 if( $wgRevisionCacheExpiry && $text !== false ) {
00911 $wgMemc->set( $key, $text, $wgRevisionCacheExpiry );
00912 }
00913
00914 wfProfileOut( __METHOD__ );
00915
00916 return $text;
00917 }
00918
00933 public static function newNullRevision( $dbw, $pageId, $summary, $minor ) {
00934 wfProfileIn( __METHOD__ );
00935
00936 $current = $dbw->selectRow(
00937 array( 'page', 'revision' ),
00938 array( 'page_latest', 'rev_text_id', 'rev_len' ),
00939 array(
00940 'page_id' => $pageId,
00941 'page_latest=rev_id',
00942 ),
00943 __METHOD__ );
00944
00945 if( $current ) {
00946 $revision = new Revision( array(
00947 'page' => $pageId,
00948 'comment' => $summary,
00949 'minor_edit' => $minor,
00950 'text_id' => $current->rev_text_id,
00951 'parent_id' => $current->page_latest,
00952 'len' => $current->rev_len
00953 ) );
00954 } else {
00955 $revision = null;
00956 }
00957
00958 wfProfileOut( __METHOD__ );
00959 return $revision;
00960 }
00961
00970 public function userCan( $field ) {
00971 if( ( $this->mDeleted & $field ) == $field ) {
00972 global $wgUser;
00973 $permission = ( $this->mDeleted & self::DELETED_RESTRICTED ) == self::DELETED_RESTRICTED
00974 ? 'suppressrevision'
00975 : 'deleterevision';
00976 wfDebug( "Checking for $permission due to $field match on $this->mDeleted\n" );
00977 return $wgUser->isAllowed( $permission );
00978 } else {
00979 return true;
00980 }
00981 }
00982
00983
00989 static function getTimestampFromId( $title, $id ) {
00990 $dbr = wfGetDB( DB_SLAVE );
00991
00992 if ($id == '') {
00993 $id = 0;
00994 }
00995 $conds = array( 'rev_id' => $id );
00996 $conds['rev_page'] = $title->getArticleId();
00997 $timestamp = $dbr->selectField( 'revision', 'rev_timestamp', $conds, __METHOD__ );
00998 if ( $timestamp === false && wfGetLB()->getServerCount() > 1 ) {
00999 # Not in slave, try master
01000 $dbw = wfGetDB( DB_MASTER );
01001 $timestamp = $dbw->selectField( 'revision', 'rev_timestamp', $conds, __METHOD__ );
01002 }
01003 return wfTimestamp( TS_MW, $timestamp );
01004 }
01005
01011 static function countByPageId( $db, $id ) {
01012 $row = $db->selectRow( 'revision', 'COUNT(*) AS revCount',
01013 array( 'rev_page' => $id ), __METHOD__ );
01014 if( $row ) {
01015 return $row->revCount;
01016 }
01017 return 0;
01018 }
01019
01025 static function countByTitle( $db, $title ) {
01026 $id = $title->getArticleId();
01027 if( $id ) {
01028 return Revision::countByPageId( $db, $id );
01029 }
01030 return 0;
01031 }
01032 }
01033
01037 define( 'MW_REV_DELETED_TEXT', Revision::DELETED_TEXT );
01038 define( 'MW_REV_DELETED_COMMENT', Revision::DELETED_COMMENT );
01039 define( 'MW_REV_DELETED_USER', Revision::DELETED_USER );
01040 define( 'MW_REV_DELETED_RESTRICTED', Revision::DELETED_RESTRICTED );