Jump to content

Module:Article history/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius (talk | contribs) at 00:48, 9 December 2014 (start documenting the classes). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

This module implements Template:Article history (edit | talk | history | links | watch | logs). It has a configuration module at Module:Article history/config (edit | talk | history | links | watch | logs), and a Category class at Module:Article history/Category (edit | talk | history | links | watch | logs).

Object documentation

ArticleHistory

ArticleHistory objects have the following public properties:

  • args - a table of the arguments passed to the module by the user.
  • currentTitle - the title object for the current page.
  • cfg - the module config table. This is taken from the config module at Module:Article history/config, but is structured slightly differently due to preprocessing by the main module. Any table with an "aliases" subtable has this table removed, and the aliases are added as keys that the table can be accessed from. Conceptually, the config table { foo = {"a value", aliases = {"bar", "baz"} } } would become {foo = {"a value"}, bar = {"a value"}, baz = {"a value"} }. (Although "bar" and "baz" would actually be references to the "foo" table, rather than completely new tables.)