Manual:LinksUpdate.php
From Linux Web Expert
MediaWiki file: LinksUpdate.php | |
---|---|
Location: | includes/deferred/LinksUpdate/ |
Source code: | master • 1.41.1 • 1.40.3 • 1.39.7 |
Classes: | LinksUpdate |
MW 1.35:
MediaWiki file: LinksUpdate.php | |
---|---|
Location: | includes/deferred/ |
Source code: | master • 1.41.1 • 1.40.3 • 1.39.7 |
Classes: | LinksUpdate |
LinksUpdate.php is the updater for link tracking tables (pagelinks, imagelinks, externallinks, langlinks, iwlinks, templatelinks, categorylinks, page_props) after a page edit.
Members
$mId
$mTitle
$mParserOutput
$mLinks
- Pagelinks, in the format $mLinks[$namespace][$dbkey]. E.g. $mInterwikis['wikipedia']['Project:Foo_bar']. Each element will be set to the page.page_id, which if the target page exists will be a positive integer.$mImages
$mTemplates
$mExternals
$mCategories
$mInterlangs
$mProperties
$mRecursive
$mTriggeredRecursive
$mRevision
$linkInsertions
- generated bygetLinkInsertions()
$linkDeletions
- generated bygetLinkDeletions()
$user
$mInterwikis
- Interwiki links, in the format $mInterwikis[$prefix][$dbkey]. E.g. $mInterwikis['wikipedia']['Project:Foo_bar']. Each element will always be set to the integer 1.
Methods
LinksUpdate::doUpdate()
- Update link tables with outgoing links from an updated articleLinksUpdate::getExistingInterwikis()
- Get an array of existing inline interwiki links, as a 2-D array.LinksUpdate::getExistingLinks()
- Get an array of existing links, as a 2-D array.LinksUpdate::getInterwikiDeletions( $existing )
- Given an array of existing interwiki links, returns those links which are not in $this and thus should be deleted.LinksUpdate::getInterwikiInsertions( $existing = array() )
- Get an array of interwiki insertions for passing to the DB. Skips the titles specified by the 2-D array $existing.LinksUpdate::getLinkDeletions( $existing )
- Given an array of existing links, returns those links which are not in $this and thus should be deleted.LinksUpdate::getLinkInsertions( $existing = array() )
- Get an array of pagelinks insertions for passing to the DB Skips the titles specified by the 2-D array $existing.
Hooks
- Manual:Hooks/LinksUpdateConstructed (from
__construct()
) - Manual:Hooks/LinksUpdate (from
doUpdate()
) - Manual:Hooks/LinksUpdateComplete (from
doUpdate()
) - Manual:Hooks/LinksUpdateAfterInsert (from
incrTableUpdate()
)