Manual:LinksUpdate.php
Appearance
| MediaWiki file: LinksUpdate.php | |
|---|---|
| Location: | includes/deferred/LinksUpdate/ (includes/Deferred/LinksUpdate/ in 1.46 or later) |
| Source code: | master • 1.44.2 • 1.43.5 • 1.39.15 |
| Classes: | LinksUpdate |
MW 1.35:
| MediaWiki file: LinksUpdate.php | |
|---|---|
| Location: | includes/deferred/ (includes/Deferred/ in 1.46 or later) |
| Source code: | master • 1.44.2 • 1.43.5 • 1.39.15 |
| 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
[edit]$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 1.
Methods
[edit]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
[edit]- Manual:Hooks/LinksUpdateConstructed (from
__construct()) - Manual:Hooks/LinksUpdate (from
doUpdate()) - Manual:Hooks/LinksUpdateComplete (from
doUpdate()) - Manual:Hooks/LinksUpdateAfterInsert (from
incrTableUpdate())