Manual:Revision.php/en

The  class represents a MediaWiki revision.

This class was deprecated in MediaWiki 1.31, in favor of, and.

Creating a new Revision object
To instantiate, call one of the static factory methods:
 * - load a page revision from a given revision ID number.
 * - load either the current, or a specified, revision that's attached to a given page.
 * - load the revision for the given title with the given timestamp.
 * - load either the current, or a specified, revision that's attached to a given page.
 * - make a fake revision object from an archive table row.
 * - load a page revision from a given revision ID number.
 * - load either the current, or a specified, revision that's attached to a given page ID.
 * - load either the current, or a specified, revision that's attached to a given title.
 * - create a new null-revision for insertion into a page's history.
 * - create a new null-revision for insertion into a page's history.

Methods

 * - fetch revision content if it's available to the specified audience. If the specified audience does not have the ability to view this revision, null will be returned.
 * see.
 * This is simply wfBaseConvert( sha1( $text ), 16, 36, 31 )

Accessors

 * - get the object belonging to the current revision, if there's one.
 * - get next revision for this title.
 * - get previous revision for this title.
 * - returns the title of the page associated with this entry or null.

Audiences
One of:
 * - to be displayed to all users
 * - to be displayed to $wgUser
 * - get the text regardless of permissions