MediaWiki
1.30.0
|
Special handling for category pages. More...
Public Member Functions | |
hasViewableContent () | |
Don't return a 404 for categories in use. More... | |
isHidden () | |
Checks if a category is hidden. More... | |
Public Member Functions inherited from WikiPage | |
__clone () | |
Makes sure that the mTitle object is cloned to the newly cloned WikiPage. More... | |
__construct (Title $title) | |
Constructor and clear the article. More... | |
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) | |
Same as doDeleteArticleReal(), but returns a simple boolean. More... | |
doDeleteArticleReal ( $reason, $suppress=false, $u1=null, $u2=null, &$error='', User $user=null, $tags=[], $logsubtype='delete') | |
Back-end article deletion Deletes the article with database consistency, writes logs, purges caches. More... | |
doDeleteUpdates ( $id, Content $content=null, Revision $revision=null) | |
Do some database updates after deletion. More... | |
doEditContent (Content $content, $summary, $flags=0, $baseRevId=false, User $user=null, $serialFormat=null, $tags=[], $undidRevId=0) | |
Change an existing article or create a new article. More... | |
doEditUpdates (Revision $revision, 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... | |
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 () | |
#- More... | |
getComment ( $audience=Revision::FOR_PUBLIC, User $user=null) | |
getContent ( $audience=Revision::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=Revision::FOR_PUBLIC, User $user=null) | |
Get the User object of the user who created the page. More... | |
getDeletionUpdates (Content $content=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 () | |
getLastPurgeTimestamp () | |
Get the last time a user explicitly purged the page via action=purge. More... | |
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... | |
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=null) | |
Get the content that needs to be saved in order to undo all revisions between $undo and $undoafter. More... | |
getUser ( $audience=Revision::FOR_PUBLIC, User $user=null) | |
getUserText ( $audience=Revision::FOR_PUBLIC, User $user=null) | |
getWikiDisplayName () | |
The display name for the site this content come from. 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... | |
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... | |
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... | |
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... | |
Additional Inherited Members | |
Static Public Member Functions inherited from WikiPage | |
static | factory (Title $title) |
Create a WikiPage object of the appropriate class for the given title. 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, Revision $revision=null) |
Purge caches on page update etc. More... | |
static | selectFields () |
Return the list of revision fields that should be selected to create a new page. More... | |
Public Attributes inherited from WikiPage | |
PreparedEdit | $mPreparedEdit = false |
Map of cache fields (text, parser output, ect) for a proposed/new edit. More... | |
Title | $mTitle = null |
const | PURGE_ALL = 7 |
const | PURGE_CDN_CACHE = 1 |
const | PURGE_CLUSTER_PCACHE = 2 |
const | PURGE_GLOBAL_PCACHE = 4 |
$mDataLoaded = false | |
$mIsRedirect = false | |
$mLatest = false | |
Public Attributes inherited from IDBAccessObject | |
const | READ_LOCKING = 3 |
Constants for object loading bitfield flags (higher => higher QoS) More... | |
const | READ_NONE = -1 |
Protected Member Functions inherited from WikiPage | |
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... | |
setLastEdit (Revision $revision) | |
Set the latest revision. More... | |
Static Protected Member Functions inherited from WikiPage | |
static | flattenRestrictions ( $limit) |
Take an array of page restrictions and flatten it to a string suitable for insertion into the page_restrictions field. More... | |
Protected Attributes inherited from WikiPage | |
int | $mDataLoadedFrom = self::READ_NONE |
One of the READ_* constants. More... | |
int | $mId = null |
Revision | $mLastRevision = null |
string | $mLinksUpdated = '19700101000000' |
Title | $mRedirectTarget = null |
string | $mTimestamp = '' |
Timestamp of the current revision or empty string if not loaded. More... | |
string | $mTouched = '19700101000000' |
Special handling for category pages.
Definition at line 26 of file WikiCategoryPage.php.
WikiCategoryPage::hasViewableContent | ( | ) |
Don't return a 404 for categories in use.
In use defined as: either the actual page exists or the category currently has members.
Reimplemented from WikiPage.
Definition at line 35 of file WikiCategoryPage.php.
References Category\newFromTitle().
WikiCategoryPage::isHidden | ( | ) |
Checks if a category is hidden.
Definition at line 58 of file WikiCategoryPage.php.
References PageProps\getInstance(), WikiPage\getTitle(), and true.