Manual:LinksUpdate.php

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:LinksUpdate.php and the translation is 60% complete.

Other languages:
English • ‎dansk • ‎español • ‎polski • ‎日本語

LinksUpdate.php is the updater for link tracking tables (pagelinks, imagelinks, externallinks, langlinks, iwlinks, templatelinks, categorylinks, page_props) after a page edit.

Medlemmer

  • $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 by getLinkInsertions()
  • $linkDeletions - generated by getLinkDeletions()
  • $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.

Metoder

  • LinksUpdate::doUpdate() - Update link tables with outgoing links from an updated article
  • LinksUpdate::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