Příprava:LinksUpdate.php
Appearance
| Soubor MediaWiki: LinksUpdate.php | |
|---|---|
| Lokalita: | includes/deferred/LinksUpdate/ (1 v 1.46 nebo novější) |
| Zdrojový kód: | master • 1.45.1 • 1.44.3 • 1.43.6 |
| Třídy: | MediaWiki\Deferred\LinksUpdate\LinksUpdate |
LinksUpdate.php je aktualizace pro tabulky sledování odkazů (pagelinks, imagelinks, externallinks, langlinks, iwlinks, templatelinks, categorylinks, page_props) po úpravě stránky.
Členové
$mId$mTitle$mParserOutput$mLinks- Pagelinks, in the format $mLinks[$namespace][$dbkey]. Např. $mInterwikis['wikipedia']['Project:Foo_bar']. Každý prvek bude nastaven na hodnotu page.page_id, která, pokud cílová stránka existuje, bude kladné celé číslo.$mImages$mTemplates$mExternals$mCategories$mInterlangs$mProperties$mRecursive$mTriggeredRecursive$mRevision$linkInsertions- generovánogetLinkInsertions()$linkDeletions- generovánogetLinkDeletions()$user$mInterwikis- Interwiki links, in the format $mInterwikis[$prefix][$dbkey]. Např. $mInterwikis['wikipedia']['Project:Foo_bar']. Každý prvek bude vždy nastaven na 1.
Metody
LinksUpdate::doUpdate()- aktualizovat tabulky odkazů o odchozí odkazy z aktualizovaného článkuLinksUpdate::getExistingInterwikis()- získat pole existujících vložených interwiki odkazů jako 2D pole.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.
Háčky
- Manual:Hooks/LinksUpdate (from
doUpdate()) - Manual:Hooks/LinksUpdateComplete (from
doUpdate())