MediaWiki REL1_33
|
Page revision base class. More...
Public Member Functions | |
__construct (Title $title, RevisionSlots $slots, $wikiId=false) | |
__sleep () | |
Implemented to defy serialization. | |
audienceCan ( $field, $audience, User $user=null) | |
Check that the given audience has access to the given field. | |
getComment ( $audience=self::FOR_PUBLIC, User $user=null) | |
Fetch revision comment, if it's available to the specified audience. | |
getContent ( $role, $audience=self::FOR_PUBLIC, User $user=null) | |
Returns the Content of the given slot of this revision. | |
getId () | |
Get revision ID. | |
getInheritedSlots () | |
Returns slots inherited from some previous revision. | |
getOriginalSlots () | |
Returns the slots that originate in this revision. | |
getPageAsLinkTarget () | |
Returns the title of the page this revision is associated with as a LinkTarget object. | |
getPageId () | |
Get the page ID. | |
getParentId () | |
Get parent revision ID (the original previous page revision). | |
getSha1 () | |
Returns the base36 sha1 of this revision. | |
getSize () | |
Returns the nominal size of this revision, in bogo-bytes. | |
getSlot ( $role, $audience=self::FOR_PUBLIC, User $user=null) | |
Returns meta-data for the given slot. | |
getSlotRoles () | |
Returns the slot names (roles) of all slots present in this revision. | |
getSlots () | |
Returns the slots defined for this revision. | |
getTimestamp () | |
MCR migration note: this replaces Revision::getTimestamp. | |
getUser ( $audience=self::FOR_PUBLIC, User $user=null) | |
Fetch revision's author's user identity, if it's available to the specified audience. | |
getVisibility () | |
Get the deletion bitfield of the revision. | |
getWikiId () | |
Get the ID of the wiki this revision belongs to. | |
hasSameContent (RevisionRecord $rec) | |
hasSlot ( $role) | |
Returns whether the given slot is defined in this revision. | |
isDeleted ( $field) | |
MCR migration note: this replaces Revision::isDeleted. | |
isMinor () | |
MCR migration note: this replaces Revision::isMinor. | |
isReadyForInsertion () | |
Returns whether this RevisionRecord is ready for insertion, that is, whether it contains all information needed to save it to the database. | |
Static Public Member Functions | |
static | userCanBitfield ( $bitfield, $field, User $user, Title $title=null) |
Determine if the current user is allowed to view a particular field of this revision, if it's marked as deleted. | |
Public Attributes | |
const | DELETED_COMMENT = 2 |
const | DELETED_RESTRICTED = 8 |
const | DELETED_TEXT = 1 |
const | DELETED_USER = 4 |
const | FOR_PUBLIC = 1 |
const | FOR_THIS_USER = 2 |
const | RAW = 3 |
const | SUPPRESSED_ALL |
const | SUPPRESSED_USER = self::DELETED_USER | self::DELETED_RESTRICTED |
Protected Member Functions | |
userCan ( $field, User $user) | |
Determine if the current user is allowed to view a particular field of this revision, if it's marked as deleted. | |
Protected Attributes | |
CommentStoreComment null | $mComment |
int | $mDeleted = 0 |
using the DELETED_XXX and SUPPRESSED_XXX flags | |
int null | $mId |
bool | $mMinorEdit = false |
int | $mPageId |
int null | $mParentId |
string null | $mSha1 |
int null | $mSize |
RevisionSlots | $mSlots |
string null | $mTimestamp |
Title | $mTitle |
UserIdentity null | $mUser |
string | $mWiki = false |
Wiki ID; false means the current wiki. | |
Page revision base class.
RevisionRecords are considered value objects, but they may use callbacks for lazy loading. Note that while the base class has no setters, subclasses may offer a mutable interface.
Definition at line 45 of file RevisionRecord.php.
MediaWiki\Revision\RevisionRecord::__construct | ( | Title | $title, |
RevisionSlots | $slots, | ||
$wikiId = false |
|||
) |
Title | $title | The title of the page this Revision is associated with. |
RevisionSlots | $slots | The slots of this revision. |
bool | string | $wikiId | the wiki ID of the site this Revision belongs to, or false for the local site. |
MWException |
Definition at line 101 of file RevisionRecord.php.
References $title.
MediaWiki\Revision\RevisionRecord::__sleep | ( | ) |
Implemented to defy serialization.
LogicException | always |
Definition at line 117 of file RevisionRecord.php.
Check that the given audience has access to the given field.
MCR migration note: this corresponds to Revision::userCan
int | $field | One of self::DELETED_TEXT, self::DELETED_COMMENT, self::DELETED_USER |
int | $audience | One of: RevisionRecord::FOR_PUBLIC to be displayed to all users RevisionRecord::FOR_THIS_USER to be displayed to the given user RevisionRecord::RAW get the text regardless of permissions |
User | null | $user | User object to check. Required if $audience is FOR_THIS_USER, ignored otherwise. |
Definition at line 457 of file RevisionRecord.php.
References $user, MediaWiki\Revision\RevisionRecord\isDeleted(), and MediaWiki\Revision\RevisionRecord\userCan().
Referenced by ApiQueryRevisionsBase\checkRevDel(), MediaWiki\Revision\RevisionRecord\getComment(), MediaWiki\Revision\RevisionRecord\getContent(), MediaWiki\Revision\RevisionRecord\getSlot(), and MediaWiki\Revision\RevisionRecord\getUser().
Fetch revision comment, if it's available to the specified audience.
If the specified audience does not have access to the comment, this will return null. Depending on the concrete subclass, null may also be returned if the comment is not yet specified.
MCR migration note: this replaces Revision::getComment
int | $audience | One of: RevisionRecord::FOR_PUBLIC to be displayed to all users RevisionRecord::FOR_THIS_USER to be displayed to the given user RevisionRecord::RAW get the text regardless of permissions |
User | null | $user | User object to check for, only if FOR_THIS_USER is passed to the $audience parameter |
Reimplemented in MediaWiki\Revision\RevisionArchiveRecord, and MediaWiki\Revision\RevisionStoreRecord.
Definition at line 390 of file RevisionRecord.php.
References MediaWiki\Revision\RevisionRecord\$mComment, $user, and MediaWiki\Revision\RevisionRecord\audienceCan().
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordMatchesRevision(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordsEqual(), ApiQueryRevisionsBase\extractRevisionInfo(), ApiFeedContributions\feedItemDesc(), MediaWiki\Revision\RevisionStore\insertRevisionOn(), MediaWiki\Revision\RevisionRecord\isReadyForInsertion(), and MediaWiki\Storage\DerivedPageDataUpdater\prepareContent().
MediaWiki\Revision\RevisionRecord::getContent | ( | $role, | |
$audience = self::FOR_PUBLIC , |
|||
User | $user = null |
||
) |
Returns the Content of the given slot of this revision.
Call getSlotNames() to get a list of available slots.
Note that for mutable Content objects, each call to this method will return a fresh clone.
MCR migration note: this replaces Revision::getContent
string | $role | The role name of the desired slot |
int | $audience | |
User | null | $user |
RevisionAccessException | if the slot does not exist or slot data could not be lazy-loaded. |
Definition at line 167 of file RevisionRecord.php.
References $content, $user, MediaWiki\Revision\RevisionRecord\audienceCan(), and MediaWiki\Revision\RevisionRecord\getSlot().
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionCompleteness(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordMatchesRevision(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordsEqual(), ApiFeedContributions\feedItemDesc(), MediaWiki\Storage\PageUpdater\getAtomicSectionUpdate(), Article\getRevisionRedirectTarget(), and DifferenceEngine\setRevisions().
MediaWiki\Revision\RevisionRecord::getId | ( | ) |
Get revision ID.
Depending on the concrete subclass, this may return null if the revision ID is not known (e.g. because the revision does not yet exist in the database).
MCR migration note: this replaces Revision::getId
Reimplemented in MediaWiki\Revision\RevisionArchiveRecord, and MediaWiki\Revision\RevisionStoreRecord.
Definition at line 273 of file RevisionRecord.php.
References MediaWiki\Revision\RevisionRecord\$mId.
Referenced by PoolWorkArticleView\__construct(), MediaWiki\Tests\Revision\McrReadNewRevisionStoreDbTest\assertRevisionExistsInDatabase(), MediaWiki\Tests\Revision\McrRevisionStoreDbTest\assertRevisionExistsInDatabase(), MediaWiki\Tests\Revision\McrWriteBothRevisionStoreDbTest\assertRevisionExistsInDatabase(), MediaWiki\Tests\Revision\PreMcrRevisionStoreDbTest\assertRevisionExistsInDatabase(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordMatchesRevision(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertSlotCompleteness(), ApiQueryRevisionsBase\extractAllSlotInfo(), ApiQueryRevisionsBase\extractDeprecatedContent(), ApiQueryRevisionsBase\extractRevisionInfo(), McrUndoAction\getNewRevision(), MediaWiki\Revision\RevisionRecord\hasSameContent(), MediaWiki\Storage\DerivedPageDataUpdater\isReusableFor(), McrUndoAction\onSubmit(), MediaWiki\Storage\DerivedPageDataUpdater\prepareContent(), MediaWiki\Storage\DerivedPageDataUpdater\prepareUpdate(), and DifferenceEngine\setRevisions().
MediaWiki\Revision\RevisionRecord::getInheritedSlots | ( | ) |
Returns slots inherited from some previous revision.
"Inherited" slots are all slots that do not originate in this revision. Note that these slots may still differ from the one in the parent revision. This is the case for rollbacks: slots of a rollback revision are inherited from the rollback target, and are different from the slots in the parent revision, which was rolled back.
Definition at line 260 of file RevisionRecord.php.
MediaWiki\Revision\RevisionRecord::getOriginalSlots | ( | ) |
Returns the slots that originate in this revision.
Note that this does not include any slots inherited from some earlier revision, even if they are different from the slots in the immediate parent revision. This is the case for rollbacks: slots of a rollback revision are inherited from the rollback target, and are different from the slots in the parent revision, which was rolled back.
To find all slots modified by this revision against its immediate parent revision, use RevisionSlotsUpdate::newFromRevisionSlots().
Definition at line 245 of file RevisionRecord.php.
MediaWiki\Revision\RevisionRecord::getPageAsLinkTarget | ( | ) |
Returns the title of the page this revision is associated with as a LinkTarget object.
MCR migration note: this replaces Revision::getTitle
Definition at line 345 of file RevisionRecord.php.
References MediaWiki\Revision\RevisionRecord\$mTitle.
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordMatchesRevision(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordsEqual(), ApiQueryRevisionsBase\extractDeprecatedContent(), ApiQueryRevisionsBase\extractRevisionInfo(), and DifferenceEngine\setRevisions().
MediaWiki\Revision\RevisionRecord::getPageId | ( | ) |
Get the page ID.
If the page does not yet exist, the page ID is 0.
MCR migration note: this replaces Revision::getPage
Definition at line 325 of file RevisionRecord.php.
References MediaWiki\Revision\RevisionRecord\$mPageId.
Referenced by PoolWorkArticleView\__construct(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordMatchesRevision(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordsEqual(), MediaWiki\Revision\RevisionStore\getNextRevision(), MediaWiki\Revision\RevisionStore\getPreviousRevision(), MediaWiki\Revision\RevisionStore\insertRevisionOn(), and MediaWiki\Storage\DerivedPageDataUpdater\prepareContent().
MediaWiki\Revision\RevisionRecord::getParentId | ( | ) |
Get parent revision ID (the original previous page revision).
If there is no parent revision, this returns 0. If the parent revision is undefined or unknown, this returns null.
MCR migration note: this replaces Revision::getParentId
Definition at line 289 of file RevisionRecord.php.
References MediaWiki\Revision\RevisionRecord\$mParentId.
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordMatchesRevision(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordsEqual(), ApiQueryRevisionsBase\extractRevisionInfo(), MediaWiki\Storage\DerivedPageDataUpdater\isReusableFor(), MediaWiki\Storage\DerivedPageDataUpdater\prepareContent(), and MediaWiki\Storage\DerivedPageDataUpdater\prepareUpdate().
|
abstract |
Returns the base36 sha1 of this revision.
This hash is derived from the hashes of all slots associated with the revision. May be calculated on the fly if not known, which may in the worst case may involve loading all content.
MCR migration note: this replaces Revision::getSha1
RevisionAccessException | if the hash was unknown and could not be calculated. |
Reimplemented in MediaWiki\Revision\MutableRevisionRecord, MediaWiki\Revision\RevisionArchiveRecord, and MediaWiki\Revision\RevisionStoreRecord.
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordMatchesRevision(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordsEqual(), ApiQueryRevisionsBase\extractRevisionInfo(), MediaWiki\Revision\RevisionRecord\hasSameContent(), and MediaWiki\Revision\RevisionStore\insertRevisionOn().
|
abstract |
Returns the nominal size of this revision, in bogo-bytes.
May be calculated on the fly if not known, which may in the worst case may involve loading all content.
MCR migration note: this replaces Revision::getSize
RevisionAccessException | if the size was unknown and could not be calculated. |
Reimplemented in MediaWiki\Revision\MutableRevisionRecord, MediaWiki\Revision\RevisionArchiveRecord, and MediaWiki\Revision\RevisionStoreRecord.
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordMatchesRevision(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordsEqual(), ApiQueryRevisionsBase\extractRevisionInfo(), MediaWiki\Revision\RevisionRecord\hasSameContent(), and MediaWiki\Revision\RevisionStore\insertRevisionOn().
MediaWiki\Revision\RevisionRecord::getSlot | ( | $role, | |
$audience = self::FOR_PUBLIC , |
|||
User | $user = null |
||
) |
Returns meta-data for the given slot.
string | $role | The role name of the desired slot |
int | $audience | |
User | null | $user |
RevisionAccessException | if the slot does not exist or slot data could not be lazy-loaded. |
Definition at line 191 of file RevisionRecord.php.
References $user, MediaWiki\Revision\RevisionRecord\audienceCan(), and MediaWiki\Revision\SlotRecord\newWithSuppressedContent().
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionCompleteness(), MediaWiki\Tests\Revision\McrWriteBothRevisionStoreDbTest\assertRevisionExistsInDatabase(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordMatchesRevision(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordsEqual(), ApiQueryRevisionsBase\extractAllSlotInfo(), MediaWiki\Revision\RevisionRecord\getContent(), McrUndoAction\getNewRevision(), and MediaWiki\Storage\DerivedPageDataUpdater\getSecondaryDataUpdates().
MediaWiki\Revision\RevisionRecord::getSlotRoles | ( | ) |
Returns the slot names (roles) of all slots present in this revision.
getContent() will succeed only for the names returned by this method.
Definition at line 218 of file RevisionRecord.php.
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionCompleteness(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordsEqual(), ApiQueryRevisionsBase\extractRevisionInfo(), McrUndoAction\getNewRevision(), and McrUndoAction\onSubmit().
MediaWiki\Revision\RevisionRecord::getSlots | ( | ) |
Returns the slots defined for this revision.
Reimplemented in MediaWiki\Revision\MutableRevisionRecord.
Definition at line 227 of file RevisionRecord.php.
References MediaWiki\Revision\RevisionRecord\$mSlots.
Referenced by McrUndoAction\getNewRevision(), MediaWiki\Storage\DerivedPageDataUpdater\isReusableFor(), MediaWiki\Storage\DerivedPageDataUpdater\prepareContent(), and MediaWiki\Storage\DerivedPageDataUpdater\prepareUpdate().
MediaWiki\Revision\RevisionRecord::getTimestamp | ( | ) |
MCR migration note: this replaces Revision::getTimestamp.
May return null if the timestamp was not specified.
Reimplemented in MediaWiki\Revision\RevisionArchiveRecord, and MediaWiki\Revision\RevisionStoreRecord.
Definition at line 436 of file RevisionRecord.php.
References MediaWiki\Revision\RevisionRecord\$mTimestamp.
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordMatchesRevision(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordsEqual(), ApiQueryRevisionsBase\extractRevisionInfo(), MediaWiki\Revision\RevisionStore\insertRevisionOn(), MediaWiki\Revision\RevisionRecord\isReadyForInsertion(), and MediaWiki\Storage\DerivedPageDataUpdater\prepareContent().
Fetch revision's author's user identity, if it's available to the specified audience.
If the specified audience does not have access to it, null will be returned. Depending on the concrete subclass, null may also be returned if the user is not yet specified.
MCR migration note: this replaces Revision::getUser
int | $audience | One of: RevisionRecord::FOR_PUBLIC to be displayed to all users RevisionRecord::FOR_THIS_USER to be displayed to the given user RevisionRecord::RAW get the ID regardless of permissions |
User | null | $user | User object to check for, only if FOR_THIS_USER is passed to the $audience parameter |
Reimplemented in MediaWiki\Revision\RevisionArchiveRecord, MediaWiki\Revision\RevisionStoreCacheRecord, and MediaWiki\Revision\RevisionStoreRecord.
Definition at line 365 of file RevisionRecord.php.
References MediaWiki\Revision\RevisionRecord\$mUser, $user, and MediaWiki\Revision\RevisionRecord\audienceCan().
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordMatchesRevision(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordsEqual(), ApiQueryRevisionsBase\extractRevisionInfo(), ApiFeedContributions\feedItemAuthor(), MediaWiki\Revision\RevisionStore\insertRevisionOn(), MediaWiki\Revision\RevisionRecord\isReadyForInsertion(), MediaWiki\Storage\DerivedPageDataUpdater\prepareContent(), and MediaWiki\Storage\DerivedPageDataUpdater\prepareUpdate().
MediaWiki\Revision\RevisionRecord::getVisibility | ( | ) |
Get the deletion bitfield of the revision.
MCR migration note: this replaces Revision::getVisibility
Reimplemented in MediaWiki\Revision\RevisionStoreCacheRecord.
Definition at line 425 of file RevisionRecord.php.
References MediaWiki\Revision\RevisionRecord\$mDeleted.
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordMatchesRevision(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordsEqual(), MediaWiki\Revision\RevisionRecord\isDeleted(), MediaWiki\Storage\DerivedPageDataUpdater\prepareContent(), and MediaWiki\Revision\RevisionRecord\userCan().
MediaWiki\Revision\RevisionRecord::getWikiId | ( | ) |
Get the ID of the wiki this revision belongs to.
Definition at line 334 of file RevisionRecord.php.
References MediaWiki\Revision\RevisionRecord\$mWiki.
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordsEqual().
MediaWiki\Revision\RevisionRecord::hasSameContent | ( | RevisionRecord | $rec | ) |
RevisionRecord | $rec |
Definition at line 127 of file RevisionRecord.php.
References MediaWiki\Revision\RevisionRecord\getId(), MediaWiki\Revision\RevisionRecord\getSha1(), and MediaWiki\Revision\RevisionRecord\getSize().
Referenced by MediaWiki\Storage\DerivedPageDataUpdater\prepareContent().
MediaWiki\Revision\RevisionRecord::hasSlot | ( | $role | ) |
Returns whether the given slot is defined in this revision.
string | $role | The role name of the desired slot |
Definition at line 208 of file RevisionRecord.php.
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionCompleteness(), and McrUndoAction\getNewRevision().
MediaWiki\Revision\RevisionRecord::isDeleted | ( | $field | ) |
MCR migration note: this replaces Revision::isDeleted.
int | $field | One of DELETED_* bitfield constants |
Reimplemented in MediaWiki\Revision\RevisionStoreRecord.
Definition at line 414 of file RevisionRecord.php.
References MediaWiki\Revision\RevisionRecord\getVisibility().
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordsEqual(), MediaWiki\Revision\RevisionRecord\audienceCan(), ApiQueryRevisionsBase\checkRevDel(), and ApiQueryRevisionsBase\extractRevisionInfo().
MediaWiki\Revision\RevisionRecord::isMinor | ( | ) |
MCR migration note: this replaces Revision::isMinor.
Definition at line 403 of file RevisionRecord.php.
References MediaWiki\Revision\RevisionRecord\$mMinorEdit.
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordMatchesRevision(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertRevisionRecordsEqual(), ApiQueryRevisionsBase\extractRevisionInfo(), and MediaWiki\Storage\DerivedPageDataUpdater\prepareContent().
MediaWiki\Revision\RevisionRecord::isReadyForInsertion | ( | ) |
Returns whether this RevisionRecord is ready for insertion, that is, whether it contains all information needed to save it to the database.
This should trivially be true for RevisionRecords loaded from the database.
Note that this may return true even if getId() or getPage() return null or 0, since these are generally assigned while the revision is saved to the database, and may not be available before.
Reimplemented in MediaWiki\Revision\RevisionArchiveRecord, and MediaWiki\Revision\RevisionStoreRecord.
Definition at line 547 of file RevisionRecord.php.
References MediaWiki\Revision\RevisionRecord\getComment(), MediaWiki\Revision\RevisionRecord\getTimestamp(), and MediaWiki\Revision\RevisionRecord\getUser().
|
protected |
Determine if the current user is allowed to view a particular field of this revision, if it's marked as deleted.
MCR migration note: this corresponds to Revision::userCan
int | $field | One of self::DELETED_TEXT, self::DELETED_COMMENT, self::DELETED_USER |
User | $user | User object to check |
Reimplemented in MediaWiki\Revision\RevisionStoreRecord.
Definition at line 487 of file RevisionRecord.php.
References $user, MediaWiki\Revision\RevisionRecord\getVisibility(), and MediaWiki\Revision\RevisionRecord\userCanBitfield().
Referenced by MediaWiki\Revision\RevisionRecord\audienceCan().
|
static |
Determine if the current user is allowed to view a particular field of this revision, if it's marked as deleted.
This is used by various classes to avoid duplication.
MCR migration note: this replaces Revision::userCanBitfield
int | $bitfield | Current field |
int | $field | One of self::DELETED_TEXT = File::DELETED_FILE, self::DELETED_COMMENT = File::DELETED_COMMENT, self::DELETED_USER = File::DELETED_USER |
User | $user | User object to check |
Title | null | $title | A Title object to check for per-page restrictions on, instead of just plain userrights |
Definition at line 508 of file RevisionRecord.php.
References $title, $user, as, and wfDebug().
Referenced by MediaWiki\Revision\RevisionRecord\userCan().
|
protected |
Definition at line 82 of file RevisionRecord.php.
Referenced by MediaWiki\Revision\RevisionRecord\getComment().
|
protected |
using the DELETED_XXX and SUPPRESSED_XXX flags
Definition at line 74 of file RevisionRecord.php.
Referenced by MediaWiki\Revision\RevisionRecord\getVisibility().
|
protected |
Definition at line 64 of file RevisionRecord.php.
Referenced by MediaWiki\Revision\RevisionRecord\getId().
|
protected |
Definition at line 70 of file RevisionRecord.php.
Referenced by MediaWiki\Revision\RevisionRecord\isMinor().
|
protected |
Definition at line 66 of file RevisionRecord.php.
Referenced by MediaWiki\Revision\RevisionRecord\getPageId().
|
protected |
Definition at line 80 of file RevisionRecord.php.
Referenced by MediaWiki\Revision\RevisionRecord\getParentId().
|
protected |
Definition at line 78 of file RevisionRecord.php.
Referenced by MediaWiki\Revision\MutableRevisionRecord\getSha1(), MediaWiki\Revision\RevisionArchiveRecord\getSha1(), and MediaWiki\Revision\RevisionStoreRecord\getSha1().
|
protected |
Definition at line 76 of file RevisionRecord.php.
Referenced by MediaWiki\Revision\MutableRevisionRecord\getSize(), MediaWiki\Revision\RevisionArchiveRecord\getSize(), and MediaWiki\Revision\RevisionStoreRecord\getSize().
|
protected |
Definition at line 88 of file RevisionRecord.php.
Referenced by MediaWiki\Revision\RevisionRecord\getSlots().
|
protected |
Definition at line 72 of file RevisionRecord.php.
Referenced by MediaWiki\Revision\RevisionRecord\getTimestamp().
|
protected |
Definition at line 85 of file RevisionRecord.php.
Referenced by MediaWiki\Revision\RevisionRecord\getPageAsLinkTarget().
|
protected |
Definition at line 68 of file RevisionRecord.php.
Referenced by MediaWiki\Revision\RevisionRecord\getUser().
|
protected |
Wiki ID; false means the current wiki.
Definition at line 62 of file RevisionRecord.php.
Referenced by MediaWiki\Revision\RevisionRecord\getWikiId().
const MediaWiki\Revision\RevisionRecord::DELETED_COMMENT = 2 |
Definition at line 49 of file RevisionRecord.php.
const MediaWiki\Revision\RevisionRecord::DELETED_RESTRICTED = 8 |
Definition at line 51 of file RevisionRecord.php.
const MediaWiki\Revision\RevisionRecord::DELETED_TEXT = 1 |
Definition at line 48 of file RevisionRecord.php.
Referenced by MediaWiki\Revision\RevisionRenderer\getRenderedRevision(), and MediaWiki\Revision\RenderedRevision\isContentDeleted().
const MediaWiki\Revision\RevisionRecord::DELETED_USER = 4 |
Definition at line 50 of file RevisionRecord.php.
const MediaWiki\Revision\RevisionRecord::FOR_PUBLIC = 1 |
Definition at line 57 of file RevisionRecord.php.
Referenced by MediaWiki\Revision\RevisionRenderer\getRenderedRevision().
const MediaWiki\Revision\RevisionRecord::FOR_THIS_USER = 2 |
Definition at line 58 of file RevisionRecord.php.
Referenced by MediaWiki\Revision\RenderedRevision\__construct(), and MediaWiki\Revision\RevisionRenderer\getRenderedRevision().
const MediaWiki\Revision\RevisionRecord::RAW = 3 |
const MediaWiki\Revision\RevisionRecord::SUPPRESSED_ALL |
Definition at line 53 of file RevisionRecord.php.
const MediaWiki\Revision\RevisionRecord::SUPPRESSED_USER = self::DELETED_USER | self::DELETED_RESTRICTED |
Definition at line 52 of file RevisionRecord.php.