MediaWiki  master
WikiPage Class Reference

Class representing a MediaWiki article and history. More...

Inheritance diagram for WikiPage:
Collaboration diagram for WikiPage:

Public Member Functions

 __clone ()
 Makes sure that the mTitle object is cloned to the newly cloned WikiPage. More...
 
 __construct (Title $title)
 
 checkFlags ( $flags)
 Check flags and add EDIT_NEW or EDIT_UPDATE to them as needed. More...
 
 checkTouched ()
 Loads page_touched and returns a value indicating if it should be used. More...
 
 clear ()
 Clear the object. More...
 
 clearPreparedEdit ()
 Clear the mPreparedEdit cache field, as may be needed by mutable content types. More...
 
 commitRollback ( $fromP, $summary, $bot, &$resultDetails, User $guser, $tags=null)
 Backend implementation of doRollback(), please refer there for parameter and return value documentation. More...
 
 doDeleteArticle ( $reason, $suppress=false, $u1=null, $u2=null, &$error='', User $user=null, $immediate=false)
 Same as doDeleteArticleReal(), but returns a simple boolean. More...
 
 doDeleteArticleBatched ( $reason, $suppress, User $deleter, $tags, $logsubtype, $immediate=false, $webRequestId=null)
 Back-end article deletion. More...
 
 doDeleteArticleReal ( $reason, $user=false, $suppress=false, $u2=null, &$error='', User $deleter=null, $tags=[], $logsubtype='delete', $immediate=false)
 Back-end article deletion Deletes the article with database consistency, writes logs, purges caches. More...
 
 doDeleteUpdates ( $id, Content $content=null, $revRecord=null, User $user=null)
 Do some database updates after deletion. More...
 
 doEditContent (Content $content, $summary, $flags=0, $originalRevId=false, User $user=null, $serialFormat=null, $tags=[], $undidRevId=0)
 Change an existing article or create a new article. More...
 
 doEditUpdates ( $revisionRecord, User $user, array $options=[])
 Do standard deferred updates after page edit. More...
 
 doPurge ()
 Perform the actions of a page purging. More...
 
 doRollback ( $fromP, $summary, $token, $bot, &$resultDetails, User $user, $tags=null)
 Roll back the most recent consecutive set of edits to a page from the same user; fails if there are no eligible edits to roll back to, e.g. More...
 
 doSecondaryDataUpdates (array $options=[])
 Do secondary data updates (such as updating link tables). More...
 
 doUpdateRestrictions (array $limit, array $expiry, &$cascade, $reason, User $user, $tags=null)
 Update the article's restriction field, and leave a log entry. More...
 
 doViewUpdates (User $user, $oldid=0)
 Do standard deferred updates after page view (existing or missing page) More...
 
 exists ()
 
 followRedirect ()
 Get the Title object or URL this page redirects to. More...
 
 getActionOverrides ()
 
 getAutoDeleteReason (&$hasHistory)
 Auto-generates a deletion reason. More...
 
 getCategories ()
 Returns a list of categories this page is a member of. More...
 
 getComment ( $audience=RevisionRecord::FOR_PUBLIC, User $user=null)
 
 getContent ( $audience=RevisionRecord::FOR_PUBLIC, User $user=null)
 Get the content of the current revision. More...
 
 getContentHandler ()
 Returns the ContentHandler instance to be used to deal with the content of this WikiPage. More...
 
 getContentModel ()
 Returns the page's content model id (see the CONTENT_MODEL_XXX constants). More...
 
 getContributors ()
 Get a list of users who have edited this article, not including the user who made the most recent revision, which you can get from $article->getUser() if you want it. More...
 
 getCreator ( $audience=RevisionRecord::FOR_PUBLIC, User $user=null)
 Get the User object of the user who created the page. More...
 
 getDeletionUpdates ( $rev=null)
 Returns a list of updates to be performed when this page is deleted. More...
 
 getHiddenCategories ()
 Returns a list of hidden categories this page is a member of. More...
 
 getId ()
 
 getLatest ()
 Get the page_latest field. More...
 
 getLinksTimestamp ()
 Get the page_links_updated field. More...
 
 getMinorEdit ()
 Returns true if last revision was marked as "minor edit". More...
 
 getMutableCacheKeys (WANObjectCache $cache)
 
 getOldestRevision ()
 Get the Revision object of the oldest revision. More...
 
 getParserOutput (ParserOptions $parserOptions, $oldid=null, $forceParse=false)
 Get a ParserOutput for the given ParserOptions and revision ID. More...
 
 getRedirectTarget ()
 If this page is a redirect, get its target. More...
 
 getRedirectURL ( $rt)
 Get the Title object or URL to use for a redirect. More...
 
 getRevision ()
 Get the latest revision. More...
 
 getRevisionRecord ()
 Get the latest revision. More...
 
 getSourceURL ()
 Get the source URL for the content on this page, typically the canonical URL, but may be a remote link if the content comes from another site. More...
 
 getTimestamp ()
 
 getTitle ()
 Get the title object of the article. More...
 
 getTouched ()
 Get the page_touched field. More...
 
 getUndoContent (Revision $undo, Revision $undoafter)
 Get the content that needs to be saved in order to undo all revisions between $undo and $undoafter. More...
 
 getUser ( $audience=RevisionRecord::FOR_PUBLIC, User $user=null)
 
 getUserText ( $audience=RevisionRecord::FOR_PUBLIC, User $user=null)
 
 getWikiDisplayName ()
 The display name for the site this content come from. More...
 
 hasViewableContent ()
 Check if this page is something we're going to be showing some sort of sensible content for. More...
 
 insertNullProtectionRevision (string $revCommentMsg, array $limit, array $expiry, bool $cascade, string $reason, User $user)
 Insert a new null revision for this page. More...
 
 insertOn ( $dbw, $pageId=null)
 Insert a new empty page record for this article. More...
 
 insertProtectNullRevision ( $revCommentMsg, array $limit, array $expiry, $cascade, $reason, $user=null)
 Insert a new null revision for this page. More...
 
 insertRedirect ()
 Insert an entry for this page into the redirect table if the content is a redirect. More...
 
 insertRedirectEntry (Title $rt, $oldLatest=null)
 Insert or update the redirect table entry for this page to indicate it redirects to $rt. More...
 
 isBatchedDelete ( $safetyMargin=0)
 Determines if deletion of this page would be batched (executed over time by the job queue) or not (completed in the same request as the delete call). More...
 
 isCountable ( $editInfo=false)
 Determine whether a page would be suitable for being counted as an article in the site_stats table based on the title & its content. More...
 
 isLocal ()
 Whether this content displayed on this page comes from the local database. More...
 
 isRedirect ()
 Tests if the article content represents a redirect. More...
 
 loadFromRow ( $data, $from)
 Load the object from a database row. More...
 
 loadPageData ( $from='fromdb')
 Load the object from a given source by title. More...
 
 lockAndGetLatest ()
 Lock the page row for this title+id and return page_latest (or 0) More...
 
 makeParserOptions ( $context)
 Get parser options suitable for rendering the primary article wikitext. More...
 
 newPageUpdater (User $user, RevisionSlotsUpdate $forUpdate=null)
 Returns a PageUpdater for creating new revisions on this page (or creating the page). More...
 
 pageDataFromId ( $dbr, $id, $options=[])
 Fetch a page record matching the requested ID. More...
 
 pageDataFromTitle ( $dbr, $title, $options=[])
 Fetch a page record matching the Title object's namespace and title using a sanitized title string. More...
 
 prepareContentForEdit (Content $content, $revision=null, User $user=null, $serialFormat=null, $useCache=true)
 Prepare content which is about to be saved. More...
 
 protectDescription (array $limit, array $expiry)
 Builds the description to serve as comment for the edit. More...
 
 protectDescriptionLog (array $limit, array $expiry)
 Builds the description to serve as comment for the log entry. More...
 
 replaceSectionAtRev ( $sectionId, Content $sectionContent, $sectionTitle='', $baseRevId=null)
 
 replaceSectionContent ( $sectionId, Content $sectionContent, $sectionTitle='', $edittime=null)
 
 setTimestamp ( $ts)
 Set the page timestamp (use only to avoid DB queries) More...
 
 shouldCheckParserCache (ParserOptions $parserOptions, $oldId)
 Should the parser cache be used? More...
 
 supportsSections ()
 Returns true if this page's content model supports sections. More...
 
 triggerOpportunisticLinksUpdate (ParserOutput $parserOutput)
 Opportunistically enqueue link update jobs given fresh parser output if useful. More...
 
 updateCategoryCounts (array $added, array $deleted, $id=0)
 Update all the appropriate counts in the category table, given that we've added the categories $added and deleted the categories $deleted. More...
 
 updateIfNewerOn ( $dbw, $revision)
 If the given revision is newer than the currently set page_latest, update the page record. More...
 
 updateParserCache (array $options=[])
 Update the parser cache. More...
 
 updateRedirectOn ( $dbw, $redirectTitle, $lastRevIsRedirect=null)
 Add row to the redirect table if this is a redirect, remove otherwise. More...
 
 updateRevisionOn ( $dbw, $revision, $lastRevision=null, $lastRevIsRedirect=null)
 Update the page record to point to a newly saved revision. More...
 
 wasLoadedFrom ( $from)
 Checks whether the page data was loaded using the given database access mode (or better). More...
 

Static Public Member Functions

static convertSelectType ( $type)
 Convert 'fromdb', 'fromdbmaster' and 'forupdate' to READ_* constants. More...
 
static factory (Title $title)
 Create a WikiPage object of the appropriate class for the given title. More...
 
static getQueryInfo ()
 Return the tables, fields, and join conditions to be selected to create a new page object. More...
 
static hasDifferencesOutsideMainSlot ( $a, $b)
 Helper method for checking whether two revisions have differences that go beyond the main slot. More...
 
static newFromID ( $id, $from='fromdb')
 Constructor from a page id. More...
 
static newFromRow ( $row, $from='fromdb')
 Constructor from a database row. More...
 
static onArticleCreate (Title $title)
 The onArticle*() functions are supposed to be a kind of hooks which should be called whenever any of the specified actions are done. More...
 
static onArticleDelete (Title $title)
 Clears caches when article is deleted. More...
 
static onArticleEdit (Title $title, $revRecord=null, $slotsChanged=null)
 Purge caches on page update etc. More...
 

Public Attributes

bool $mDataLoaded = false
 
bool $mIsRedirect = false
 
int false $mLatest = false
 False means "not loaded". More...
 
PreparedEdit false $mPreparedEdit = false
 Map of cache fields (text, parser output, ect) for a proposed/new edit. More...
 
Title $mTitle = null
 
- Public Attributes inherited from IDBAccessObject
const READ_NONE = -1
 Constants for object loading bitfield flags (higher => higher QoS) More...
 

Protected Member Functions

 archiveRevisions ( $dbw, $id, $suppress)
 Archives revisions as part of page deletion. More...
 
 clearCacheFields ()
 Clear the object cache fields. More...
 
 formatExpiry ( $expiry)
 
 loadLastEdit ()
 Loads everything except the text This isn't necessary for all uses, so it's only done if needed. More...
 
 pageData ( $dbr, $conditions, $options=[])
 Fetch a page record with the given conditions. More...
 

Protected Attributes

int $mDataLoadedFrom = self::READ_NONE
 One of the READ_* constants. More...
 
int $mId = null
 
string $mLinksUpdated = '19700101000000'
 
Title $mRedirectTarget = null
 
string $mTimestamp = ''
 Timestamp of the current revision or empty string if not loaded. More...
 
string $mTouched = '19700101000000'
 

Private Member Functions

 getContentHandlerFactory ()
 
 getDBLoadBalancer ()
 
 getDerivedDataUpdater (User $forUser=null, RevisionRecord $forRevision=null, RevisionSlotsUpdate $forUpdate=null, $forEdit=false)
 Returns a DerivedPageDataUpdater for use with the given target revision or new content. More...
 
 getParserCache ()
 
 getRevisionRenderer ()
 
 getRevisionStore ()
 
 getSlotRoleRegistry ()
 
 newDerivedDataUpdater ()
 
 setLastEdit (RevisionRecord $revRecord)
 Set the latest revision. More...
 

Static Private Member Functions

static purgeInterwikiCheckKey (Title $title)
 #- More...
 

Private Attributes

DerivedPageDataUpdater null $derivedDataUpdater = null
 
RevisionRecord $mLastRevision = null
 

Detailed Description

Class representing a MediaWiki article and history.

Some fields are public only for backwards-compatibility. Use accessors. In the past, this class was part of Article.php and everything was public.

Definition at line 52 of file WikiPage.php.

Constructor & Destructor Documentation

◆ __construct()

WikiPage::__construct ( Title  $title)
Parameters
Title$title

Definition at line 135 of file WikiPage.php.

References $title.

Member Function Documentation

◆ __clone()

WikiPage::__clone ( )

Makes sure that the mTitle object is cloned to the newly cloned WikiPage.

Definition at line 143 of file WikiPage.php.

References $mTitle.

◆ archiveRevisions()

WikiPage::archiveRevisions (   $dbw,
  $id,
  $suppress 
)
protected

Archives revisions as part of page deletion.

Parameters
IDatabase$dbw
int$id
bool$suppressSuppress all revisions and log the deletion in the suppression log instead of the deletion log
Returns
bool

Definition at line 2981 of file WikiPage.php.

References $res, $revQuery, $wgDeleteRevisionsBatchSize, getRevisionStore(), CommentStore\getStore(), getTitle(), User\newFromAnyId(), and ActorMigration\newMigration().

Referenced by doDeleteArticleBatched().

◆ checkFlags()

WikiPage::checkFlags (   $flags)

Check flags and add EDIT_NEW or EDIT_UPDATE to them as needed.

Deprecated:
since 1.32, use exists() instead, or simply omit the EDIT_UPDATE and EDIT_NEW flags. To protect against race conditions, use PageUpdater::grabParentRevision.
Parameters
int$flags
Returns
int Updated $flags

Definition at line 1687 of file WikiPage.php.

References EDIT_NEW, EDIT_UPDATE, and exists().

◆ checkTouched()

WikiPage::checkTouched ( )

Loads page_touched and returns a value indicating if it should be used.

Returns
bool True if this page exists and is not a redirect

Definition at line 626 of file WikiPage.php.

References loadPageData().

◆ clear()

WikiPage::clear ( )

Clear the object.

Returns
void

Definition at line 289 of file WikiPage.php.

References clearCacheFields(), and IDBAccessObject\READ_NONE.

◆ clearCacheFields()

WikiPage::clearCacheFields ( )
protected

Clear the object cache fields.

Returns
void

Definition at line 300 of file WikiPage.php.

Referenced by clear(), and loadFromRow().

◆ clearPreparedEdit()

WikiPage::clearPreparedEdit ( )

Clear the mPreparedEdit cache field, as may be needed by mutable content types.

Returns
void
Since
1.23

Definition at line 320 of file WikiPage.php.

◆ commitRollback()

WikiPage::commitRollback (   $fromP,
  $summary,
  $bot,
$resultDetails,
User  $guser,
  $tags = null 
)

◆ convertSelectType()

static WikiPage::convertSelectType (   $type)
static

Convert 'fromdb', 'fromdbmaster' and 'forupdate' to READ_* constants.

Parameters
object | string | int$type
Returns
mixed

Definition at line 197 of file WikiPage.php.

References $type.

Referenced by loadFromRow(), loadPageData(), Page\WikiPageFactory\newFromID(), and wasLoadedFrom().

◆ doDeleteArticle()

WikiPage::doDeleteArticle (   $reason,
  $suppress = false,
  $u1 = null,
  $u2 = null,
$error = '',
User  $user = null,
  $immediate = false 
)

Same as doDeleteArticleReal(), but returns a simple boolean.

This is kept around for backwards compatibility, if you care about error reporting you should use doDeleteArticleReal() instead.

Deprecated:
since 1.35

Deletes the article with database consistency, writes logs, purges caches

Parameters
string$reasonDelete reason for deletion log
bool$suppressSuppress all revisions and log the deletion in the suppression log instead of the deletion log
int | null$u1Unused
bool | null$u2Unused
array | string&$errorArray of errors to append to
User | null$userThe deleting user
bool$immediatefalse allows deleting over time via the job queue
Returns
bool True if successful
Exceptions
FatalError
MWException

Definition at line 2720 of file WikiPage.php.

References doDeleteArticleReal(), and wfDeprecated().

◆ doDeleteArticleBatched()

WikiPage::doDeleteArticleBatched (   $reason,
  $suppress,
User  $deleter,
  $tags,
  $logsubtype,
  $immediate = false,
  $webRequestId = null 
)

Back-end article deletion.

Only invokes batching via the job queue if necessary per $wgDeleteRevisionsBatchSize. Deletions can often be completed inline without involving the job queue.

Potentially called many times per deletion operation for pages with many revisions.

Parameters
string$reason
bool$suppress
User$deleter
array$tags
string$logsubtype
bool$immediate
string | null$webRequestId
Returns
Status

Definition at line 2809 of file WikiPage.php.

References $content, $job, $mTitle, archiveRevisions(), DB_MASTER, doDeleteUpdates(), getContent(), getId(), User\getId(), ObjectCache\getInstance(), getLatest(), WebRequest\getRequestId(), getRevisionRecord(), getTitle(), loadPageData(), lockAndGetLatest(), StatusValue\newGood(), JobQueueGroup\singleton(), wfDebug(), wfEscapeWikiText(), wfGetDB(), and wfLogWarning().

Referenced by doDeleteArticleReal().

◆ doDeleteArticleReal()

WikiPage::doDeleteArticleReal (   $reason,
  $user = false,
  $suppress = false,
  $u2 = null,
$error = '',
User  $deleter = null,
  $tags = [],
  $logsubtype = 'delete',
  $immediate = false 
)

Back-end article deletion Deletes the article with database consistency, writes logs, purges caches.

Since
1.19
1.35 Signature changed, user moved to second parameter to prepare for requiring a user to be passed; not passing a user is deprecated since 1.35
Parameters
string$reasonDelete reason for deletion log
user | bool$userThe deleting user (not passing a user is deprecated since 1.35)
bool | null$suppressSuppress all revisions and log the deletion in the suppression log instead of the deletion log
bool | null$u2Unused
array | string&$errorArray of errors to append to
User | null$deleterThe deleting user in the old signature, unused in the new
array$tagsTags to apply to the deletion action
string$logsubtype
bool$immediatefalse allows deleting over time via the job queue
Returns
Status Status object; if successful, $status->value is the log_id of the deletion log entry. If the page couldn't be deleted because it wasn't found, $status is a non-fatal 'cannotdelete' error
Exceptions
FatalError
MWException

Definition at line 2756 of file WikiPage.php.

References doDeleteArticleBatched(), StatusValue\newGood(), onArticleDelete(), wfDebug(), and wfDeprecated().

Referenced by ApiDelete\delete(), and doDeleteArticle().

◆ doDeleteUpdates()

WikiPage::doDeleteUpdates (   $id,
Content  $content = null,
  $revRecord = null,
User  $user = null 
)

Do some database updates after deletion.

Parameters
int$idThe page_id value of the page being deleted
Content | null$contentPage content to be used when determining the required updates. This may be needed because $this->getContent() may already return null when the page proper was deleted.
RevisionRecord | Revision | null$revRecordThe current page revision at the time of deletion, used when determining the required updates. This may be needed because $this->getRevisionRecord() may already return null when the page proper was deleted. Passing a Revision is deprecated since 1.35
User | null$userThe user that caused the deletion

Definition at line 3126 of file WikiPage.php.

References $content, DeferredUpdates\addUpdate(), SiteStatsUpdate\factory(), WikiMap\getCurrentWikiDbDomain(), getDeletionUpdates(), getId(), ResourceLoaderWikiModule\invalidateModuleCache(), isCountable(), loadFromRow(), NS_FILE, onArticleDelete(), LinksUpdate\queueRecursiveJobsForTable(), and wfDeprecated().

Referenced by doDeleteArticleBatched().

◆ doEditContent()

WikiPage::doEditContent ( Content  $content,
  $summary,
  $flags = 0,
  $originalRevId = false,
User  $user = null,
  $serialFormat = null,
  $tags = [],
  $undidRevId = 0 
)

Change an existing article or create a new article.

Updates RC and all necessary caches, optionally via the deferred update array.

Deprecated:
since 1.32, use PageUpdater::saveRevision instead. Note that the new method expects callers to take care of checking EDIT_MINOR against the minoredit right, and to apply the autopatrol right as appropriate.
Parameters
Content$contentNew content
string | CommentStoreComment$summaryEdit summary
int$flagsBitfield: EDIT_NEW Article is known or assumed to be non-existent, create a new one EDIT_UPDATE Article is known or assumed to be pre-existing, update it EDIT_MINOR Mark this edit minor, if the user is allowed to do so EDIT_SUPPRESS_RC Do not log the change in recentchanges EDIT_FORCE_BOT Mark the edit a "bot" edit regardless of user rights EDIT_AUTOSUMMARY Fill in blank summaries with generated text where possible EDIT_INTERNAL Signal that the page retrieve/save cycle happened entirely in this request.

If neither EDIT_NEW nor EDIT_UPDATE is specified, the status of the article will be detected. If EDIT_UPDATE is specified and the article doesn't exist, the function will return an edit-gone-missing error. If EDIT_NEW is specified and the article does exist, an edit-already-exists error will be returned. These two conditions are also possible with auto-detection due to MediaWiki's performance-optimised locking strategy.

Parameters
bool | int$originalRevId,The ID of an original revision that the edit restores or repeats. This is used with reverts and with dummy "null" revisions which are created to record things like page moves. The new revision does not have to have the exact same content as the given original revision, an additional check is made to determine whether these edits really match. In case they don't, $originalRevId is set to false by this method.
User | null$userThe user doing the edit
string | null$serialFormatIGNORED.
array | null$tagsChange tags to apply to this edit Callers are responsible for permission checks (with ChangeTags::canAddTagsAccompanyingChange)
int$undidRevIdId of the last revision that was undone or 0
Exceptions
MWException
Returns
Status Possible errors: edit-hook-aborted: The ArticleSave hook aborted the edit but didn't set the fatal flag of $status. edit-gone-missing: In update mode, but the article didn't exist. edit-conflict: In update mode, the article changed unexpectedly. edit-no-change: Warning that the text was the same as before. edit-already-exists: In creation mode, but the article already exists.

Extensions may define additional errors.

$return->value will contain an associative array with members as follows: new: Boolean indicating if the function attempted to create a new article. revision: The revision object for the inserted revision, or null. Trying to access this Revision object is deprecated since 1.35 revision-record: The RevisionRecord object for the inserted revision, or null.

Since
1.21
Exceptions
MWException

Definition at line 1903 of file WikiPage.php.

References $content, $wgUseNPPatrol, $wgUseRCPatrol, EDIT_MINOR, exists(), getRevisionStore(), newPageUpdater(), CommentStoreComment\newUnsavedComment(), RecentChange\PRC_AUTOPATROLLED, and setLastEdit().

Referenced by ContentModelChange\doContentModelChange().

◆ doEditUpdates()

WikiPage::doEditUpdates (   $revisionRecord,
User  $user,
array  $options = [] 
)

Do standard deferred updates after page edit.

Update links tables, site stats, search index and message cache. Purges pages that include this page if the text was changed here. Every 100th edit, prune the recent changes table.

Deprecated:
since 1.32 (soft), use DerivedPageDataUpdater::doUpdates instead.
Parameters
Revision | RevisionRecord$revisionRecordsince 1.35, can be a RevisionRecord object, and passing a Revision is hard deprecated
User$userUser object that did the revision
array$optionsArray of options, following indexes are used:
  • changed: bool, whether the revision changed the content (default true)
  • created: bool, whether the revision created the page (default false)
  • moved: bool, whether the page was moved (default false)
  • restored: bool, whether the page was undeleted (default false)
  • oldrevision: RevisionRecord object for the pre-update revision (default null) can also be a Revision object, but that is deprecated since 1.35
  • oldcountable: bool, null, or string 'no-change' (default null):
    • bool: whether the page was counted as an article before that revision, only used in changed is true and created is false
    • null: if created is false, don't update the article count; if created is true, do update the article count
    • 'no-change': don't update the article count, ever

Definition at line 2119 of file WikiPage.php.

References getDerivedDataUpdater(), User\getName(), and wfDeprecated().

◆ doPurge()

WikiPage::doPurge ( )

Perform the actions of a page purging.

Returns
bool
Note
In 1.28 (and only 1.28), this took a $flags parameter that controlled how much purging was done.

Reimplemented in WikiFilePage.

Definition at line 1278 of file WikiPage.php.

References getContent(), and NS_MEDIAWIKI.

◆ doRollback()

WikiPage::doRollback (   $fromP,
  $summary,
  $token,
  $bot,
$resultDetails,
User  $user,
  $tags = null 
)

Roll back the most recent consecutive set of edits to a page from the same user; fails if there are no eligible edits to roll back to, e.g.

user is the sole contributor. This function performs permissions checks on $user, then calls commitRollback() to do the dirty work

Definition at line 3215 of file WikiPage.php.

References commitRollback(), User\matchEditToken(), User\pingLimiter(), and wfArrayDiff2().

◆ doSecondaryDataUpdates()

WikiPage::doSecondaryDataUpdates ( array  $options = [])

Do secondary data updates (such as updating link tables).

Secondary data updates are only a small part of the updates needed after saving a new revision; normally PageUpdater::doUpdates should be used instead (which includes secondary data updates). This method is provided for partial purges.

Note
This is a temporary workaround until there is a proper data updater class. It will become deprecated soon.
Parameters
array$options
  • recursive (bool, default true): whether to do a recursive update (update pages that depend on this page, e.g. transclude it). This will set the $recursive parameter of Content::getSecondaryDataUpdates. Typically this should be true unless the update was something that did not really change the page, such as a null edit.
  • triggeringUser: The user triggering the update (UserIdentity, defaults to the user who created the revision)
  • causeAction: an arbitrary string identifying the reason for the update. See DataUpdate::getCauseAction(). (default 'unknown')
  • causeAgent: name of the user who caused the update (string, default 'unknown')
  • defer: one of the DeferredUpdates constants, or false to run immediately (default: false). Note that even when this is set to false, some updates might still get deferred (as some update might directly add child updates to DeferredUpdates).
  • known-revision-output: a combined canonical ParserOutput for the revision, perhaps from some cache. The caller is responsible for ensuring that the ParserOutput indeed matched the $rev and $options. This mechanism is intended as a temporary stop-gap, for the time until caches have been changed to store RenderedRevision states instead of ParserOutput objects. (default: null) (since 1.33)
Since
1.32

Definition at line 2202 of file WikiPage.php.

References getDerivedDataUpdater(), getRevisionRecord(), and User\newFromIdentity().

◆ doUpdateRestrictions()

WikiPage::doUpdateRestrictions ( array  $limit,
array  $expiry,
$cascade,
  $reason,
User  $user,
  $tags = null 
)

Update the article's restriction field, and leave a log entry.

This works for protection both existing and non-existing pages.

Parameters
array$limitSet of restriction keys
array$expiryPer restriction type expiration
int&$cascadeSet to false if cascading protection isn't allowed.
string$reason
User$userThe user updating the restrictions
string | string[] | null$tagsChange tags to add to the pages and protection log entries ($user should be able to add the specified tags before this is called)
Returns
Status Status object; if action is taken, $status->value is the log_id of the protection log entry.

Definition at line 2232 of file WikiPage.php.

References $wgCascadingRestrictionLevels, DB_MASTER, getId(), User\getId(), getLatest(), CommentStore\getStore(), insertNullProtectionRevision(), InfoAction\invalidateCache(), loadPageData(), StatusValue\newFatal(), StatusValue\newGood(), protectDescriptionLog(), Title\purgeExpiredRestrictions(), wfGetDB(), wfMessage(), wfReadOnly(), and wfReadOnlyReason().

◆ doViewUpdates()

WikiPage::doViewUpdates ( User  $user,
  $oldid = 0 
)

Do standard deferred updates after page view (existing or missing page)

Parameters
User$userThe relevant user
int$oldidRevision id being viewed; if not given or 0, latest revision is assumed

Definition at line 1255 of file WikiPage.php.

References DeferredUpdates\addCallableUpdate(), User\clearNotification(), DeferredUpdates\PRESEND, and wfReadOnly().

◆ exists()

WikiPage::exists ( )
Returns
bool Whether or not the page exists in the database

Definition at line 551 of file WikiPage.php.

References loadPageData().

Referenced by LinksDeletionUpdate\__construct(), checkFlags(), doEditContent(), getContentModel(), and shouldCheckParserCache().

◆ factory()

static WikiPage::factory ( Title  $title)
static

Create a WikiPage object of the appropriate class for the given title.

Parameters
Title$title
Exceptions
MWException
Returns
WikiPage|WikiCategoryPage|WikiFilePage
Deprecated:
since 1.36, use WikiPageFactory::newFromTitle instead

Definition at line 156 of file WikiPage.php.

References $title.

Referenced by WikiImporter\beforeImportPage(), Orphans\checkSeparation(), CleanupSpam\cleanupArticle(), Installer\createMainpage(), FileDeleteForm\doDelete(), UppercaseTitlesForUnicodeTransition\doMove(), MovePageForm\doSubmit(), WatchAction\doUnwatch(), WatchAction\doWatch(), ApiPurge\execute(), CompareParserCache\execute(), ApiStashEdit\execute(), ViewCLI\execute(), MakeTestEdits\execute(), DeleteDefaultMessages\execute(), ImportSiteScripts\execute(), Protect\execute(), AttachLatest\execute(), ApiEditPage\execute(), RollbackEdits\execute(), ApiRollback\execute(), EditCLI\execute(), DeleteBatch\execute(), ApiParse\execute(), DeleteEqualMessages\execute(), ImportImages\execute(), WikiImporter\finishImportPage(), WANCacheReapUpdate\getEventAffectedKeys(), SearchNearMatcher\getNearMatchInternal(), EditPage\getPreloadedContent(), AbstractContent\getRedirectChain(), SpecialListRedirects\getRedirectTarget(), SearchExactMatchRescorer\getRedirectTarget(), ApiPageSet\getRedirectTargets(), ApiBase\getTitleOrPageId(), RequestContext\getWikiPage(), ImportableOldRevisionImporter\import(), MediaWiki\initializeArticle(), PopulateArchiveRevId\makeDummyRevisionRow(), MergeHistory\merge(), MovePage\moveToInternal(), RecentChange\newForCategorization(), SpecialChangeContentModel\onSubmit(), XmlDumpWriter\openPage(), PurgePage\purge(), MessageCache\refreshAndReplaceInternal(), DifferenceEngine\renderNewRevision(), ImportReporter\reportPage(), DeleteLinksJob\run(), DoubleRedirectJob\run(), RefreshLinksJob\runForTitle(), SpecialEditWatchlist\runWatchUnwatchCompleteHook(), SpecialUndelete\showDiff(), PageArchive\undeleteRevisions(), and LinksUpdate\updateCategoryCounts().

◆ followRedirect()

WikiPage::followRedirect ( )

Get the Title object or URL this page redirects to.

Returns
bool|Title|string False, Title of in-wiki target, or string with URL

Reimplemented in WikiFilePage.

Definition at line 1091 of file WikiPage.php.

References getRedirectTarget(), and getRedirectURL().

◆ formatExpiry()

WikiPage::formatExpiry (   $expiry)
protected
Parameters
string$expiry14-char timestamp or "infinity", or false if the input was invalid
Returns
string

Definition at line 2599 of file WikiPage.php.

References wfMessage().

Referenced by protectDescription(), and protectDescriptionLog().

◆ getActionOverrides()

WikiPage::getActionOverrides ( )
Todo:
Move this UI stuff somewhere else
See also
ContentHandler::getActionOverrides
Returns
array

Definition at line 259 of file WikiPage.php.

References getContentHandler().

◆ getAutoDeleteReason()

WikiPage::getAutoDeleteReason ( $hasHistory)

Auto-generates a deletion reason.

Parameters
bool&$hasHistoryWhether the page has a history
Returns
string|bool String containing deletion reason or empty string, or boolean false if no revision occurred

Definition at line 3785 of file WikiPage.php.

References getContentHandler(), and getTitle().

Referenced by ApiDelete\delete().

◆ getCategories()

WikiPage::getCategories ( )

Returns a list of categories this page is a member of.

Results will include hidden categories

Returns
TitleArray

Definition at line 3731 of file WikiPage.php.

References $dbr, $res, DB_REPLICA, getId(), TitleArray\newFromResult(), NS_CATEGORY, and wfGetDB().

◆ getComment()

WikiPage::getComment (   $audience = RevisionRecord::FOR_PUBLIC,
User  $user = null 
)
Parameters
int$audienceOne 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$userUser object to check for, only if FOR_THIS_USER is passed to the $audience parameter (not passing for FOR_THIS_USER is deprecated since 1.35)
Returns
string|null Comment stored for the last article revision, or null if the specified audience does not have access to the comment.

Definition at line 885 of file WikiPage.php.

References loadLastEdit(), and wfDeprecated().

◆ getContent()

WikiPage::getContent (   $audience = RevisionRecord::FOR_PUBLIC,
User  $user = null 
)

Get the content of the current revision.

No side-effects...

Parameters
int$audienceOne of: RevisionRecord::FOR_PUBLIC to be displayed to all users RevisionRecord::FOR_THIS_USER to be displayed to $wgUser RevisionRecord::RAW get the text regardless of permissions
User | null$userUser object to check for, only if FOR_THIS_USER is passed to the $audience parameter
Returns
Content|null The content of the current revision
Since
1.21

Definition at line 765 of file WikiPage.php.

References loadLastEdit().

Referenced by doDeleteArticleBatched(), doPurge(), TextContentHandler\getDataForSearchIndex(), ContentHandler\getDataForSearchIndex(), ApiParse\getParsedContent(), EditPage\getPreloadedContent(), insertRedirect(), isCountable(), and replaceSectionAtRev().

◆ getContentHandler()

WikiPage::getContentHandler ( )

Returns the ContentHandler instance to be used to deal with the content of this WikiPage.

Shorthand for ContentHandler::getForModelID( $this->getContentModel() );

Returns
ContentHandler
Since
1.21

Definition at line 272 of file WikiPage.php.

References getContentHandlerFactory(), and getContentModel().

Referenced by getActionOverrides(), getAutoDeleteReason(), replaceSectionAtRev(), shouldCheckParserCache(), and supportsSections().

◆ getContentHandlerFactory()

WikiPage::getContentHandlerFactory ( )
private
Returns
ContentHandlerFactory

Definition at line 235 of file WikiPage.php.

Referenced by getContentHandler(), and newPageUpdater().

◆ getContentModel()

WikiPage::getContentModel ( )

Returns the page's content model id (see the CONTENT_MODEL_XXX constants).

Will use the revisions actual content model if the page exists, and the page's default if the page doesn't exist yet.

Returns
string
Since
1.21

Definition at line 593 of file WikiPage.php.

References $cache, $title, exists(), getRevisionRecord(), and wfWarn().

Referenced by getContentHandler(), and ParserCache\incrementStats().

◆ getContributors()

WikiPage::getContributors ( )

Get a list of users who have edited this article, not including the user who made the most recent revision, which you can get from $article->getUser() if you want it.

Returns
UserArrayFromResult

Definition at line 1140 of file WikiPage.php.

References $dbr, $res, DB_REPLICA, getId(), getUser(), getUserText(), User\newFromId(), User\newFromName(), ActorMigration\newMigration(), and wfGetDB().

◆ getCreator()

WikiPage::getCreator (   $audience = RevisionRecord::FOR_PUBLIC,
User  $user = null 
)

Get the User object of the user who created the page.

Parameters
int$audienceOne 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$userUser object to check for, only if FOR_THIS_USER is passed to the $audience parameter (not passing for FOR_THIS_USER is deprecated since 1.35)
Returns
User|null

Definition at line 831 of file WikiPage.php.

References getRevisionStore(), getTitle(), and wfDeprecated().

◆ getDBLoadBalancer()

WikiPage::getDBLoadBalancer ( )
private
Returns
LoadBalancer

Definition at line 249 of file WikiPage.php.

Referenced by loadPageData(), newPageUpdater(), and replaceSectionContent().

◆ getDeletionUpdates()

WikiPage::getDeletionUpdates (   $rev = null)

Returns a list of updates to be performed when this page is deleted.

The updates should remove any information about this page from secondary data stores such as links tables.

Parameters
RevisionRecord | Content | null$revThe revision being deleted. Also accepts a Content object for backwards compatibility.
Returns
DeferrableUpdate[]

Definition at line 3938 of file WikiPage.php.

References $content, Revision\SlotRecord\getContent(), getId(), getRevisionRecord(), getTitle(), wfDebug(), and wfDeprecated().

Referenced by doDeleteUpdates().

◆ getDerivedDataUpdater()

WikiPage::getDerivedDataUpdater ( User  $forUser = null,
RevisionRecord  $forRevision = null,
RevisionSlotsUpdate  $forUpdate = null,
  $forEdit = false 
)
private

Returns a DerivedPageDataUpdater for use with the given target revision or new content.

This method attempts to re-use the same DerivedPageDataUpdater instance for subsequent calls. The parameters passed to this method are used to ensure that the DerivedPageDataUpdater returned matches that caller's expectations, allowing an existing instance to be re-used if the given parameters match that instance's internal state according to DerivedPageDataUpdater::isReusableFor(), and creating a new instance of the parameters do not match the existign one.

If neither $forRevision nor $forUpdate is given, a new DerivedPageDataUpdater is always created, replacing any DerivedPageDataUpdater currently cached.

MCR migration note: this replaces WikiPage::prepareContentForEdit.

Since
1.32
Parameters
User | null$forUserThe user that will be used for, or was used for, PST.
RevisionRecord | null$forRevisionThe revision created by the edit for which to perform updates, if the edit was already saved.
RevisionSlotsUpdate | null$forUpdateThe new content to be saved by the edit (pre PST), if the edit was not yet saved.
bool$forEditOnly re-use if the cached DerivedPageDataUpdater has the current revision as the edit's parent revision. This ensures that the same DerivedPageDataUpdater cannot be re-used for two consecutive edits.
Returns
DerivedPageDataUpdater

Definition at line 1754 of file WikiPage.php.

References $derivedDataUpdater, and newDerivedDataUpdater().

Referenced by doEditUpdates(), doSecondaryDataUpdates(), newPageUpdater(), prepareContentForEdit(), and updateParserCache().

◆ getHiddenCategories()

WikiPage::getHiddenCategories ( )

Returns a list of hidden categories this page is a member of.

Uses the page_props and categorylinks tables.

Returns
array Array of Title objects

Definition at line 3754 of file WikiPage.php.

References $dbr, $res, DB_REPLICA, getId(), Title\makeTitle(), NS_CATEGORY, and wfGetDB().

◆ getId()

◆ getLatest()

WikiPage::getLatest ( )

Get the page_latest field.

Returns
int The rev_id of current revision

Definition at line 659 of file WikiPage.php.

References $mLatest, and loadPageData().

Referenced by doDeleteArticleBatched(), doUpdateRestrictions(), ParserCache\getKey(), ApiParse\getParsedContent(), getParserOutput(), insertRedirect(), loadLastEdit(), InfoAction\pageCounts(), and shouldCheckParserCache().

◆ getLinksTimestamp()

WikiPage::getLinksTimestamp ( )

Get the page_links_updated field.

Returns
string|null Containing GMT timestamp

Definition at line 648 of file WikiPage.php.

References $mLinksUpdated, and loadPageData().

Referenced by RefreshLinksJob\isAlreadyRefreshed(), and triggerOpportunisticLinksUpdate().

◆ getMinorEdit()

WikiPage::getMinorEdit ( )

Returns true if last revision was marked as "minor edit".

Returns
bool Minor edit indicator for the last article revision.

Definition at line 908 of file WikiPage.php.

References loadLastEdit().

◆ getMutableCacheKeys()

WikiPage::getMutableCacheKeys ( WANObjectCache  $cache)
Parameters
WANObjectCache$cache
Returns
string[]
Since
1.28

Definition at line 4041 of file WikiPage.php.

References $cache, and getTitle().

◆ getOldestRevision()

WikiPage::getOldestRevision ( )

Get the Revision object of the oldest revision.

Deprecated:
since 1.35 Use RevisionStore::getFirstRevision for the corresponding title instead.
Returns
Revision|null

Definition at line 672 of file WikiPage.php.

References getRevisionStore(), getTitle(), and wfDeprecated().

◆ getParserCache()

WikiPage::getParserCache ( )
private
Returns
ParserCache

Definition at line 242 of file WikiPage.php.

Referenced by getParserOutput(), and newDerivedDataUpdater().

◆ getParserOutput()

WikiPage::getParserOutput ( ParserOptions  $parserOptions,
  $oldid = null,
  $forceParse = false 
)

Get a ParserOutput for the given ParserOptions and revision ID.

The parser cache will be used if possible. Cache misses that result in parser runs are debounced with PoolCounter.

XXX merge this with updateParserCache()?

Since
1.19
Parameters
ParserOptions$parserOptionsParserOptions to use for the parse operation
null | int$oldidRevision ID to get the text from, passing null or 0 will get the current revision (default value)
bool$forceParseForce reindexing, regardless of cache settings
Returns
bool|ParserOutput ParserOutput or false if the revision was not found

Definition at line 1213 of file WikiPage.php.

References getLatest(), getParserCache(), ParserOptions\getStubThreshold(), ParserOptions\isSafeToCache(), shouldCheckParserCache(), and wfDebug().

Referenced by ApiParse\getPageParserOutput(), and DifferenceEngine\getParserOutput().

◆ getQueryInfo()

static WikiPage::getQueryInfo ( )
static

Return the tables, fields, and join conditions to be selected to create a new page object.

Since
1.31
Returns
array With three keys:
  • tables: (string[]) to include in the $table to IDatabase->select()
  • fields: (string[]) to include in the $vars to IDatabase->select()
  • joins: (array) to include in the $join_conds to IDatabase->select()

Definition at line 333 of file WikiPage.php.

References $wgPageLanguageUseDB.

Referenced by Title\getLinksFrom(), Page\WikiPageFactory\newFromID(), and pageData().

◆ getRedirectTarget()

WikiPage::getRedirectTarget ( )

If this page is a redirect, get its target.

The target will be fetched from the redirect table if possible. If this page doesn't have an entry there, call insertRedirect()

Returns
Title|null Title object, or null if this page is not a redirect

Reimplemented in WikiFilePage.

Definition at line 978 of file WikiPage.php.

References $dbr, $mRedirectTarget, DB_REPLICA, getId(), insertRedirect(), Title\makeTitle(), NS_FILE, NS_MEDIA, and wfGetDB().

Referenced by followRedirect(), and EditPage\getPreloadedContent().

◆ getRedirectURL()

WikiPage::getRedirectURL (   $rt)

Get the Title object or URL to use for a redirect.

We use Title objects for same-wiki, non-special redirects and URLs for everything else.

Parameters
Title$rtRedirect target
Returns
bool|Title|string False, Title object of local target, or string with URL

Definition at line 1102 of file WikiPage.php.

References $source.

Referenced by followRedirect().

◆ getRevision()

WikiPage::getRevision ( )

Get the latest revision.

Deprecated:
since 1.35
Returns
Revision|null

Definition at line 731 of file WikiPage.php.

References loadLastEdit(), and wfDeprecated().

◆ getRevisionRecord()

◆ getRevisionRenderer()

WikiPage::getRevisionRenderer ( )
private
Returns
RevisionRenderer

Definition at line 221 of file WikiPage.php.

Referenced by newDerivedDataUpdater().

◆ getRevisionStore()

◆ getSlotRoleRegistry()

WikiPage::getSlotRoleRegistry ( )
private
Returns
SlotRoleRegistry

Definition at line 228 of file WikiPage.php.

Referenced by newDerivedDataUpdater(), and newPageUpdater().

◆ getSourceURL()

WikiPage::getSourceURL ( )

Get the source URL for the content on this page, typically the canonical URL, but may be a remote link if the content comes from another site.

Since
1.28
Returns
string

Reimplemented in WikiFilePage.

Definition at line 4032 of file WikiPage.php.

References getTitle().

◆ getTimestamp()

WikiPage::getTimestamp ( )
Returns
string MW timestamp of last article revision

Definition at line 776 of file WikiPage.php.

References loadLastEdit().

Referenced by CreditsAction\getAuthor(), InfoAction\pageCounts(), and ParserCache\save().

◆ getTitle()

◆ getTouched()

WikiPage::getTouched ( )

Get the page_touched field.

Returns
string Containing GMT timestamp

Definition at line 637 of file WikiPage.php.

References $mTouched, and loadPageData().

Referenced by ParserCache\getETag(), ParserCache\getKey(), RefreshLinksJob\getParserOutputFromCache(), and triggerOpportunisticLinksUpdate().

◆ getUndoContent()

WikiPage::getUndoContent ( Revision  $undo,
Revision  $undoafter 
)

Get the content that needs to be saved in order to undo all revisions between $undo and $undoafter.

Revisions must belong to the same page, must exist and must not be deleted

Deprecated:
since 1.35, use ContentHandler::getUndoContent instead
Parameters
Revision$undo
Revision$undoafterMust be an earlier revision than $undo
Returns
Content|bool Content on success, false on failure
Since
1.21 Before we had the Content object, this was done in getUndoText

Definition at line 1555 of file WikiPage.php.

References Revision\getContentHandler(), Revision\getRevisionRecord(), getRevisionRecord(), and wfDeprecated().

◆ getUser()

WikiPage::getUser (   $audience = RevisionRecord::FOR_PUBLIC,
User  $user = null 
)
Parameters
int$audienceOne 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$userUser object to check for, only if FOR_THIS_USER is passed to the $audience parameter (not passing for FOR_THIS_USER is deprecated since 1.35)
Returns
int User ID for the user that made the last article revision

Definition at line 803 of file WikiPage.php.

References loadLastEdit(), and wfDeprecated().

Referenced by getContributors().

◆ getUserText()

WikiPage::getUserText (   $audience = RevisionRecord::FOR_PUBLIC,
User  $user = null 
)
Parameters
int$audienceOne 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$userUser object to check for, only if FOR_THIS_USER is passed to the $audience parameter (not passing for FOR_THIS_USER is deprecated since 1.35)
Returns
string Username of the user that made the last article revision

Definition at line 857 of file WikiPage.php.

References loadLastEdit(), and wfDeprecated().

Referenced by CreditsAction\getAuthor(), and getContributors().

◆ getWikiDisplayName()

WikiPage::getWikiDisplayName ( )

The display name for the site this content come from.

If a subclass overrides isLocal(), this could return something other than the current site name

Since
1.28
Returns
string

Reimplemented in WikiFilePage.

Definition at line 4019 of file WikiPage.php.

References $wgSitename.

◆ hasDifferencesOutsideMainSlot()

static WikiPage::hasDifferencesOutsideMainSlot (   $a,
  $b 
)
static

Helper method for checking whether two revisions have differences that go beyond the main slot.

MCR migration note: this method should go away!

Deprecated:
Use only as a stop-gap before refactoring to support MCR.
Parameters
Revision | RevisionRecord$a(revision deprecated since 1.35)
Revision | RevisionRecord$b(revision deprecated since 1.35)
Returns
bool

Definition at line 1526 of file WikiPage.php.

References wfDeprecated().

Referenced by EditPage\getContentObject().

◆ hasViewableContent()

WikiPage::hasViewableContent ( )

Check if this page is something we're going to be showing some sort of sensible content for.

If we return false, page views (plain action=view) will return an HTTP 404 response, so spiders and robots can know they're following a bad link.

Returns
bool

Reimplemented in WikiCategoryPage.

Definition at line 566 of file WikiPage.php.

◆ insertNullProtectionRevision()

WikiPage::insertNullProtectionRevision ( string  $revCommentMsg,
array  $limit,
array  $expiry,
bool  $cascade,
string  $reason,
User  $user 
)

Insert a new null revision for this page.

Parameters
string$revCommentMsgComment message key for the revision
array$limitSet of restriction keys
array$expiryPer restriction type expiration
bool$cascadeSet to false if cascading protection isn't allowed.
string$reason
User$userUser to attribute to
Returns
RevisionRecord|null Null on error

Definition at line 2539 of file WikiPage.php.

References $revStore, DB_MASTER, User\getName(), getRevisionStore(), getTitle(), CommentStoreComment\newUnsavedComment(), protectDescription(), updateRevisionOn(), wfGetDB(), and wfMessage().

Referenced by doUpdateRestrictions(), and insertProtectNullRevision().

◆ insertOn()

WikiPage::insertOn (   $dbw,
  $pageId = null 
)

Insert a new empty page record for this article.

This must be followed up by creating a revision and running $this->updateRevisionOn( ... ); or else the record will be left in a funky state. Best if all done inside a transaction.

Todo:
Factor out into a PageStore service, to be used by PageUpdater.
Parameters
IDatabase$dbw
int | null$pageIdCustom page ID that will be used for the insert statement
Returns
bool|int The newly created page_id key; false if the row was not inserted, e.g. because the title already existed or because the specified page ID is already in use.

Definition at line 1313 of file WikiPage.php.

References wfRandom().

Referenced by MediaWiki\Storage\PageUpdater\doCreate().

◆ insertProtectNullRevision()

WikiPage::insertProtectNullRevision (   $revCommentMsg,
array  $limit,
array  $expiry,
  $cascade,
  $reason,
  $user = null 
)

Insert a new null revision for this page.

Deprecated:
since 1.35, use insertNullProtectionRevision instead
Parameters
string$revCommentMsgComment message key for the revision
array$limitSet of restriction keys
array$expiryPer restriction type expiration
int$cascadeSet to false if cascading protection isn't allowed.
string$reason
User | null$userUser to attribute to, or null for $wgUser (deprecated since 1.35)
Returns
Revision|null Null on error

Definition at line 2508 of file WikiPage.php.

References insertNullProtectionRevision(), and wfDeprecated().

◆ insertRedirect()

WikiPage::insertRedirect ( )

Insert an entry for this page into the redirect table if the content is a redirect.

The database update will be deferred via DeferredUpdates

Don't call this function directly unless you know what you're doing.

Returns
Title|null Title object or null if not a redirect

Definition at line 1025 of file WikiPage.php.

References $content, DeferredUpdates\addCallableUpdate(), DB_MASTER, getContent(), getLatest(), insertRedirectEntry(), DeferredUpdates\POSTSEND, and wfGetDB().

Referenced by getRedirectTarget().

◆ insertRedirectEntry()

WikiPage::insertRedirectEntry ( Title  $rt,
  $oldLatest = null 
)

Insert or update the redirect table entry for this page to indicate it redirects to $rt.

Parameters
Title$rtRedirect target
int | null$oldLatestPrior page_latest for check and set
Returns
bool Success

Definition at line 1051 of file WikiPage.php.

References $success, DB_MASTER, Title\getDBkey(), Title\getFragment(), getId(), Title\getInterwiki(), Title\getNamespace(), lockAndGetLatest(), and wfGetDB().

Referenced by insertRedirect(), and updateRedirectOn().

◆ isBatchedDelete()

WikiPage::isBatchedDelete (   $safetyMargin = 0)

Determines if deletion of this page would be batched (executed over time by the job queue) or not (completed in the same request as the delete call).

It is unlikely but possible that an edit from another request could push the page over the batching threshold after this function is called, but before the caller acts upon the return value. Callers must decide for themselves how to deal with this. $safetyMargin is provided as an unreliable but situationally useful help for some common cases.

Parameters
int$safetyMarginAdded to the revision count when checking for batching
Returns
bool True if deletion would be batched, false otherwise

Definition at line 2689 of file WikiPage.php.

References $dbr, $wgDeleteRevisionsBatchSize, DB_REPLICA, getId(), getRevisionStore(), and wfGetDB().

◆ isCountable()

WikiPage::isCountable (   $editInfo = false)

Determine whether a page would be suitable for being counted as an article in the site_stats table based on the title & its content.

Parameters
PreparedEdit | bool$editInfo(false): object returned by prepareTextForEdit(), if false, the current database state will be used
Returns
bool

Definition at line 925 of file WikiPage.php.

References $content, $wgArticleCountMethod, DB_REPLICA, getContent(), getId(), and wfGetDB().

Referenced by doDeleteUpdates(), and MediaWiki\Storage\DerivedPageDataUpdater\grabCurrentRevision().

◆ isLocal()

WikiPage::isLocal ( )

Whether this content displayed on this page comes from the local database.

Since
1.28
Returns
bool

Reimplemented in WikiFilePage.

Definition at line 4006 of file WikiPage.php.

◆ isRedirect()

WikiPage::isRedirect ( )

Tests if the article content represents a redirect.

Returns
bool

Reimplemented in WikiFilePage.

Definition at line 575 of file WikiPage.php.

References $mIsRedirect, and loadPageData().

Referenced by EditPage\getPreloadedContent(), and MediaWiki\Storage\DerivedPageDataUpdater\grabCurrentRevision().

◆ loadFromRow()

WikiPage::loadFromRow (   $data,
  $from 
)

Load the object from a database row.

Since
1.20
Parameters
object | bool$dataDB row containing fields returned by getQueryInfo() or false
string | int$fromOne of the following:
  • "fromdb" or WikiPage::READ_NORMAL if the data comes from a replica DB
  • "fromdbmaster" or WikiPage::READ_LATEST if the data comes from the master DB
  • "forupdate" or WikiPage::READ_LOCKING if the data comes from the master DB using SELECT FOR UPDATE

Definition at line 499 of file WikiPage.php.

References clearCacheFields(), and convertSelectType().

Referenced by doDeleteUpdates(), and loadPageData().

◆ loadLastEdit()

WikiPage::loadLastEdit ( )
protected

Loads everything except the text This isn't necessary for all uses, so it's only done if needed.

Definition at line 682 of file WikiPage.php.

References getId(), getLatest(), getRevisionStore(), getTitle(), and setLastEdit().

Referenced by getComment(), getContent(), getMinorEdit(), getRevision(), getRevisionRecord(), getTimestamp(), getUser(), and getUserText().

◆ loadPageData()

WikiPage::loadPageData (   $from = 'fromdb')

Load the object from a given source by title.

Parameters
object | string | int$fromOne of the following:
  • A DB query result object.
  • "fromdb" or WikiPage::READ_NORMAL to get from a replica DB.
  • "fromdbmaster" or WikiPage::READ_LATEST to get from the master DB.
  • "forupdate" or WikiPage::READ_LOCKING to get from the master DB using SELECT FOR UPDATE.
Returns
void

Definition at line 428 of file WikiPage.php.

References convertSelectType(), DB_REPLICA, getDBLoadBalancer(), DBAccessObjectUtils\getDBOptions(), loadFromRow(), and pageDataFromTitle().

Referenced by checkTouched(), doDeleteArticleBatched(), doUpdateRestrictions(), exists(), getId(), getLatest(), getLinksTimestamp(), getTouched(), MediaWiki\Storage\DerivedPageDataUpdater\grabCurrentRevision(), isRedirect(), and ContentHandler\latestRevision().

◆ lockAndGetLatest()

WikiPage::lockAndGetLatest ( )

Lock the page row for this title+id and return page_latest (or 0)

Returns
int Returns 0 if no row was found with this title+id
Since
1.27

Definition at line 3097 of file WikiPage.php.

References DB_MASTER, getId(), getTitle(), and wfGetDB().

Referenced by doDeleteArticleBatched(), MediaWiki\Storage\PageUpdater\doModify(), and insertRedirectEntry().

◆ makeParserOptions()

WikiPage::makeParserOptions (   $context)

Get parser options suitable for rendering the primary article wikitext.

See also
ParserOptions::newCanonical
Parameters
IContextSource | User | string$contextOne of the following:
  • IContextSource: Use the User and the Language of the provided context
  • User: Use the provided User object and $wgLang for the language, so use an IContextSource object if possible.
  • 'canonical': Canonical options (anonymous user with default preferences and content language).
Returns
ParserOptions

Definition at line 2016 of file WikiPage.php.

References getTitle(), and ParserOptions\newCanonical().

Referenced by CategoryMembershipChangeJob\getCategoriesAtRev(), RefreshLinksJob\getParserOutput(), DifferenceEngine\getParserOutput(), ContentHandler\getParserOutputForIndexing(), RefreshLinksJob\getParserOutputFromCache(), and ApiParse\makeParserOptions().

◆ newDerivedDataUpdater()

◆ newFromID()

static WikiPage::newFromID (   $id,
  $from = 'fromdb' 
)
static

Constructor from a page id.

Parameters
int$idArticle ID to load
string | int$fromOne of the following values:
  • "fromdb" or WikiPage::READ_NORMAL to select from a replica DB
  • "fromdbmaster" or WikiPage::READ_LATEST to select from the master database
Returns
WikiPage|null
Deprecated:
since 1.36, use WikiPageFactory::newFromID instead

Definition at line 171 of file WikiPage.php.

Referenced by CleanupInvalidDbKeys\cleanupTable(), RefreshLinks\fixLinksFromArticle(), RefreshLinks\fixRedirect(), SearchUpdate\getLatestPage(), ApiBase\getTitleOrPageId(), DeletePageJob\run(), DeleteLinksJob\run(), and CategoryMembershipChangeJob\run().

◆ newFromRow()

static WikiPage::newFromRow (   $row,
  $from = 'fromdb' 
)
static

Constructor from a database row.

Since
1.20
Parameters
object$rowDatabase row containing at least fields returned by getQueryInfo().
string | int$fromSource of $data:
  • "fromdb" or WikiPage::READ_NORMAL: from a replica DB
  • "fromdbmaster" or WikiPage::READ_LATEST: from the master DB
  • "forupdate" or WikiPage::READ_LOCKING: from the master DB using SELECT FOR UPDATE
Returns
WikiPage
Deprecated:
since 1.36, use WikiPageFactory::newFromRow instead

Definition at line 187 of file WikiPage.php.

◆ newPageUpdater()

WikiPage::newPageUpdater ( User  $user,
RevisionSlotsUpdate  $forUpdate = null 
)

Returns a PageUpdater for creating new revisions on this page (or creating the page).

The PageUpdater can also be used to detect the need for edit conflict resolution, and to protected such conflict resolution from concurrent edits using a check-and-set mechanism.

Since
1.32
Parameters
User$user
RevisionSlotsUpdate | null$forUpdateIf given, allows any cached ParserOutput that may already have been returned via getDerivedDataUpdater to be re-used.
Returns
PageUpdater

Definition at line 1810 of file WikiPage.php.

References getContentHandlerFactory(), getDBLoadBalancer(), getDerivedDataUpdater(), getRevisionStore(), and getSlotRoleRegistry().

Referenced by commitRollback(), and doEditContent().

◆ onArticleCreate()

static WikiPage::onArticleCreate ( Title  $title)
static

The onArticle*() functions are supposed to be a kind of hooks which should be called whenever any of the specified actions are done.

This is a good place to put code to clear caches, for instance.

This is called on page move and undelete, as well as edit

Parameters
Title$title

Definition at line 3557 of file WikiPage.php.

References $job, $title, HTMLCacheUpdateJob\newForBacklinks(), Category\newFromTitle(), NS_CATEGORY, and JobQueueGroup\singleton().

Referenced by MediaWiki\Storage\DerivedPageDataUpdater\doUpdates(), and MovePage\moveToInternal().

◆ onArticleDelete()

static WikiPage::onArticleDelete ( Title  $title)
static

◆ onArticleEdit()

static WikiPage::onArticleEdit ( Title  $title,
  $revRecord = null,
  $slotsChanged = null 
)
static

Purge caches on page update etc.

Parameters
Title$title
RevisionRecord | Revision | null$revRecordRevision that was just saved, may be null passing a Revision is hard deprecated since 1.35
string[] | null$slotsChangedThe role names of the slots that were changed. If not given, all slots are assumed to have changed.

Definition at line 3650 of file WikiPage.php.

References $title, DeferredUpdates\addCallableUpdate(), InfoAction\invalidateCache(), HTMLCacheUpdateJob\newForBacklinks(), purgeInterwikiCheckKey(), JobQueueGroup\singleton(), and wfDeprecated().

Referenced by MediaWiki\Storage\DerivedPageDataUpdater\doUpdates().

◆ pageData()

WikiPage::pageData (   $dbr,
  $conditions,
  $options = [] 
)
protected

Fetch a page record with the given conditions.

Parameters
IDatabase$dbr
array$conditions
array$options
Returns
object|bool Database result resource, or false on failure

Definition at line 369 of file WikiPage.php.

References $dbr, and getQueryInfo().

Referenced by pageDataFromId(), and pageDataFromTitle().

◆ pageDataFromId()

WikiPage::pageDataFromId (   $dbr,
  $id,
  $options = [] 
)

Fetch a page record matching the requested ID.

Parameters
IDatabase$dbr
int$id
array$options
Returns
object|bool Database result resource, or false on failure

Definition at line 412 of file WikiPage.php.

References $dbr, and pageData().

◆ pageDataFromTitle()

WikiPage::pageDataFromTitle (   $dbr,
  $title,
  $options = [] 
)

Fetch a page record matching the Title object's namespace and title using a sanitized title string.

Parameters
IDatabase$dbr
Title$title
array$options
Returns
object|bool Database result resource, or false on failure

Definition at line 398 of file WikiPage.php.

References $dbr, $title, and pageData().

Referenced by loadPageData().

◆ prepareContentForEdit()

WikiPage::prepareContentForEdit ( Content  $content,
  $revision = null,
User  $user = null,
  $serialFormat = null,
  $useCache = true 
)

Prepare content which is about to be saved.

Prior to 1.30, this returned a stdClass.

Deprecated:
since 1.32, use getDerivedDataUpdater instead.
Parameters
Content$content
Revision | RevisionRecord | null$revisionRevision object. Used with vary-revision or vary-revision-id. Passing a Revision object is hard deprecated since 1.35;
User | null$user
string | null$serialFormatIGNORED
bool$useCacheCheck shared prepared edit cache
Returns
PreparedEdit
Since
1.21

Definition at line 2047 of file WikiPage.php.

References $content, getDerivedDataUpdater(), and wfDeprecated().

Referenced by MediaWiki\Storage\PageEditStash\parseAndCache().

◆ protectDescription()

WikiPage::protectDescription ( array  $limit,
array  $expiry 
)

Builds the description to serve as comment for the edit.

Parameters
array$limitSet of restriction keys
array$expiryPer restriction type expiration
Returns
string

Definition at line 2621 of file WikiPage.php.

References formatExpiry(), and wfMessage().

Referenced by insertNullProtectionRevision().

◆ protectDescriptionLog()

WikiPage::protectDescriptionLog ( array  $limit,
array  $expiry 
)

Builds the description to serve as comment for the log entry.

Some bots may parse IRC lines, which are generated from log entries which contain plain protect description text. Keep them in old format to avoid breaking compatibility. TODO: Fix protection log to store structured description and format it on-the-fly.

Parameters
array$limitSet of restriction keys
array$expiryPer restriction type expiration
Returns
string

Definition at line 2663 of file WikiPage.php.

References formatExpiry().

Referenced by doUpdateRestrictions().

◆ purgeInterwikiCheckKey()

static WikiPage::purgeInterwikiCheckKey ( Title  $title)
staticprivate

#-

Purge the check key for cross-wiki cache entries referencing this page

Parameters
Title$title

Definition at line 3703 of file WikiPage.php.

References $cache, $title, $wgEnableScaryTranscluding, DeferredUpdates\addCallableUpdate(), and WikiMap\getCurrentWikiDbDomain().

Referenced by onArticleDelete(), and onArticleEdit().

◆ replaceSectionAtRev()

WikiPage::replaceSectionAtRev (   $sectionId,
Content  $sectionContent,
  $sectionTitle = '',
  $baseRevId = null 
)
Parameters
string | int | null | bool$sectionIdSection identifier as a number or string (e.g. 0, 1 or 'T-1'), null/false or an empty string for the whole page or 'new' for a new section.
Content$sectionContentNew content of the section.
string$sectionTitleNew section's subject, only if $section is "new".
int | null$baseRevId
Exceptions
MWException
Returns
Content|null New complete article content, or null if error.
Since
1.24

Definition at line 1641 of file WikiPage.php.

References getContent(), getContentHandler(), getId(), getRevisionStore(), supportsSections(), and wfDebug().

Referenced by replaceSectionContent().

◆ replaceSectionContent()

WikiPage::replaceSectionContent (   $sectionId,
Content  $sectionContent,
  $sectionTitle = '',
  $edittime = null 
)
Parameters
string | int | null | bool$sectionIdSection identifier as a number or string (e.g. 0, 1 or 'T-1'), null/false or an empty string for the whole page or 'new' for a new section.
Content$sectionContentNew content of the section.
string$sectionTitleNew section's subject, only if $section is "new".
string$edittimeRevision timestamp or null to use the current revision.
Exceptions
MWException
Returns
Content|null New complete article content, or null if error.
Since
1.21
Deprecated:
since 1.24, use replaceSectionAtRev instead

Definition at line 1603 of file WikiPage.php.

References getDBLoadBalancer(), getRevisionStore(), and replaceSectionAtRev().

◆ setLastEdit()

WikiPage::setLastEdit ( RevisionRecord  $revRecord)
private

Set the latest revision.

Parameters
RevisionRecord$revRecord

Definition at line 721 of file WikiPage.php.

References Revision\RevisionRecord\getTimestamp().

Referenced by doEditContent(), loadLastEdit(), and updateRevisionOn().

◆ setTimestamp()

WikiPage::setTimestamp (   $ts)

Set the page timestamp (use only to avoid DB queries)

Parameters
string$tsMW timestamp of last article revision
Returns
void

Definition at line 790 of file WikiPage.php.

◆ shouldCheckParserCache()

WikiPage::shouldCheckParserCache ( ParserOptions  $parserOptions,
  $oldId 
)

Should the parser cache be used?

Parameters
ParserOptions$parserOptionsParserOptions to check
int$oldId
Returns
bool

Definition at line 1191 of file WikiPage.php.

References exists(), getContentHandler(), getLatest(), and ParserOptions\getStubThreshold().

Referenced by getParserOutput().

◆ supportsSections()

WikiPage::supportsSections ( )

Returns true if this page's content model supports sections.

Returns
bool
Todo:

The skin should check this and not offer section functionality if sections are not supported.

The EditPage should check this and not offer section functionality if sections are not supported.

Definition at line 1585 of file WikiPage.php.

References getContentHandler().

Referenced by replaceSectionAtRev().

◆ triggerOpportunisticLinksUpdate()

WikiPage::triggerOpportunisticLinksUpdate ( ParserOutput  $parserOutput)

Opportunistically enqueue link update jobs given fresh parser output if useful.

Parameters
ParserOutput$parserOutputCurrent version page output
Since
1.25

Definition at line 3884 of file WikiPage.php.

References $cache, CacheTime\getCacheExpiry(), CacheTime\getCacheTime(), getId(), getLinksTimestamp(), ObjectCache\getLocalClusterInstance(), RequestContext\getMain(), getTouched(), ParserOutput\hasDynamicContent(), RefreshLinksJob\newDynamic(), RefreshLinksJob\newPrioritized(), JobQueueGroup\singleton(), and wfReadOnly().

◆ updateCategoryCounts()

WikiPage::updateCategoryCounts ( array  $added,
array  $deleted,
  $id = 0 
)

Update all the appropriate counts in the category table, given that we've added the categories $added and deleted the categories $deleted.

This should only be called from deferred updates or jobs to avoid contention.

Parameters
string[]$addedThe names of categories that were added
string[]$deletedThe names of categories that were deleted
int$idPage ID (this should be the original deleted page ID)

Definition at line 3799 of file WikiPage.php.

References $type, DeferredUpdates\addCallableUpdate(), DB_MASTER, getId(), getTitle(), Category\newFromName(), and wfGetDB().

◆ updateIfNewerOn()

WikiPage::updateIfNewerOn (   $dbw,
  $revision 
)

If the given revision is newer than the currently set page_latest, update the page record.

Otherwise, do nothing.

Deprecated:
since 1.24 (soft), 1.35 (hard), use updateRevisionOn instead
Parameters
IDatabase$dbw
Revision$revision
Returns
bool

Definition at line 1476 of file WikiPage.php.

References getId(), updateRevisionOn(), and wfDeprecated().

◆ updateParserCache()

WikiPage::updateParserCache ( array  $options = [])

Update the parser cache.

Note
This is a temporary workaround until there is a proper data updater class. It will become deprecated soon.
Parameters
array$options
  • causeAction: an arbitrary string identifying the reason for the update. See DataUpdate::getCauseAction(). (default 'edit-page')
  • causeAgent: name of the user who caused the update (string, defaults to the user who created the revision)
Since
1.32

Definition at line 2158 of file WikiPage.php.

References getDerivedDataUpdater(), getRevisionRecord(), and User\newFromIdentity().

◆ updateRedirectOn()

WikiPage::updateRedirectOn (   $dbw,
  $redirectTitle,
  $lastRevIsRedirect = null 
)

Add row to the redirect table if this is a redirect, remove otherwise.

Parameters
IDatabase$dbw
Title | null$redirectTitleTitle object pointing to the redirect target, or NULL if this is not a redirect
null | bool$lastRevIsRedirectIf given, will optimize adding and removing rows in redirect table.
Returns
bool True on success, false on failure

Definition at line 1439 of file WikiPage.php.

References $success, getId(), getTitle(), insertRedirectEntry(), and NS_FILE.

Referenced by updateRevisionOn().

◆ updateRevisionOn()

WikiPage::updateRevisionOn (   $dbw,
  $revision,
  $lastRevision = null,
  $lastRevIsRedirect = null 
)

Update the page record to point to a newly saved revision.

Todo:
Factor out into a PageStore service, or move into PageUpdater.
Parameters
IDatabase$dbw
Revision | RevisionRecord$revisionFor ID number, and text used to set length and redirect status fields. Passing a Revision is deprecated since 1.35
int | null$lastRevisionIf given, will not overwrite the page field when different from the currently set value. Giving 0 indicates the new page flag should be set on.
bool | null$lastRevIsRedirectIf given, will optimize adding and removing rows in redirect table.
Returns
bool Success; false if the page row was missing or page_latest changed

Definition at line 1358 of file WikiPage.php.

References $content, getId(), setLastEdit(), updateRedirectOn(), and wfDeprecated().

Referenced by MediaWiki\Storage\PageUpdater\doCreate(), MediaWiki\Storage\PageUpdater\doModify(), insertNullProtectionRevision(), and updateIfNewerOn().

◆ wasLoadedFrom()

WikiPage::wasLoadedFrom (   $from)

Checks whether the page data was loaded using the given database access mode (or better).

Since
1.32
Parameters
string | int$fromOne of the following:
  • "fromdb" or WikiPage::READ_NORMAL to get from a replica DB.
  • "fromdbmaster" or WikiPage::READ_LATEST to get from the master DB.
  • "forupdate" or WikiPage::READ_LOCKING to get from the master DB using SELECT FOR UPDATE.
Returns
bool

Definition at line 473 of file WikiPage.php.

References convertSelectType().

Member Data Documentation

◆ $derivedDataUpdater

DerivedPageDataUpdater null WikiPage::$derivedDataUpdater = null
private

Definition at line 130 of file WikiPage.php.

Referenced by getDerivedDataUpdater(), and newDerivedDataUpdater().

◆ $mDataLoaded

bool WikiPage::$mDataLoaded = false
Todo:
make protected
Note
for access by subclasses only

Definition at line 69 of file WikiPage.php.

◆ $mDataLoadedFrom

int WikiPage::$mDataLoadedFrom = self::READ_NONE
protected

One of the READ_* constants.

Definition at line 100 of file WikiPage.php.

◆ $mId

int WikiPage::$mId = null
protected

Definition at line 95 of file WikiPage.php.

Referenced by getId().

◆ $mIsRedirect

bool WikiPage::$mIsRedirect = false
Todo:
make protected
Note
for access by subclasses only

Definition at line 76 of file WikiPage.php.

Referenced by isRedirect().

◆ $mLastRevision

RevisionRecord WikiPage::$mLastRevision = null
private

Definition at line 110 of file WikiPage.php.

Referenced by getRevisionRecord().

◆ $mLatest

int false WikiPage::$mLatest = false

False means "not loaded".

Todo:
make protected
Note
for access by subclasses only

Definition at line 83 of file WikiPage.php.

Referenced by getLatest().

◆ $mLinksUpdated

string WikiPage::$mLinksUpdated = '19700101000000'
protected

Definition at line 125 of file WikiPage.php.

Referenced by getLinksTimestamp().

◆ $mPreparedEdit

PreparedEdit false WikiPage::$mPreparedEdit = false

Map of cache fields (text, parser output, ect) for a proposed/new edit.

Todo:
make protected
Note
for access by subclasses only

Definition at line 90 of file WikiPage.php.

◆ $mRedirectTarget

Title WikiPage::$mRedirectTarget = null
protected

Definition at line 105 of file WikiPage.php.

Referenced by WikiFilePage\getRedirectTarget(), and getRedirectTarget().

◆ $mTimestamp

string WikiPage::$mTimestamp = ''
protected

Timestamp of the current revision or empty string if not loaded.

Definition at line 115 of file WikiPage.php.

◆ $mTitle

Title WikiPage::$mTitle = null
Todo:
make protected
Note
for access by subclasses only

Definition at line 62 of file WikiPage.php.

Referenced by __clone(), doDeleteArticleBatched(), WikiFilePage\getForeignCategories(), and getTitle().

◆ $mTouched

string WikiPage::$mTouched = '19700101000000'
protected

Definition at line 120 of file WikiPage.php.

Referenced by getTouched().


The documentation for this class was generated from the following file: