Flow/Link table spec

From mediawiki.org

We want to mimic MediaWiki behaviour with respect to links, templates and files. This is bug 57512.

Requirements[edit]

  • Linking to a page or URL, including an image or a template, should cause entries to appear on Special:WhatLinksHere, Special:LinkSearch, and in usage lists for files.
  • In particular, including a file needs to add to the GlobalUsage tables.
  • It may need to be eventually possible to add a Flow board to a category.
  • It is very preferable that we can figure out exactly which post includes a link/file/template.

Implementation – Special:WhatLinksHere / Special:LinkSearch[edit]

  • Add a tracking table that associates links with Flow items (topics, posts, board headers).
  • When new links/templates/files are added to an (existing or old) post/header/topic, add them to both the Flow tracking tables and the ordinary MediaWiki ones.
  • When a post/header/topic is edited, and new links/templates/files are removed, remove them from the Flow tracking tables, and use those tables to determine whether or not to remove them from the standard MediaWiki tracking tables (i.e. remove them from those tables if no other references exist on the given Board.)
  • Add hooks to Special:WhatLinksHere and Special:LinkSearch, and, for results from Flow, use said hooks to add a direct link to the part of the Board which includes the link/template/file.

Other matters[edit]

  • Behaviour when files and templates are changed has not yet been determined at a product level. (See "Wikitext, extensions, and templates" in Flow/FAQ#Components of the discussion system)
  • Red link / Blue link behaviour works correctly out of the box, because Flow resolves these at display time.
  • At this time Flow boards cannot be added to categories. (bugzilla:58197)

From Brad Jorsch comments in bug 57512 comment #22:

  • The list of pages using the file appears at the bottom of File-namespace pages.
  • There are also a number of API modules that query the existing links tables; there should at least be some way to
    • identify that a page is Flow (bug 60809)
    • search these Flow-specific links tables to find the actual "thing(s)" doing the linking in the particular page.