Wikipedia:Lua/Modul/Vorlage:Phab/en

aus Wikipedia, der freien Enzyklopädie
Zur Navigation springen Zur Suche springen
Vorlagenprogrammierung Diskussionen Lua Test Unterseiten
Modul Deutsch English

Modul: Dokumentation

Vorlage:Phab – Module for support of the Vorlage:Phab, and do their entire work: generate titled external link(s) to a ressource or generated page in software administration or source code repository of MediaWiki.

Functions for templates[Quelltext bearbeiten]

f
Parameters:
  • All parameters are taken from template transclusion.
  • #invoke is to be called without any parameter.
Return: external link in [brackets].
failsafe

The Failsafe interface is heading for version management of globally distributed Lua modules. It enables modules equipped with this interface to

  • ensure, that a library module required by a template or another module available as local copy does support certain functionality, or complain if not.
  • administrate global updating and linking of module codes via Wikidata.

The Failsafe interface is present both at template level and for direct Lua access.

The functions in detail are (not all supported yet completely by every library):

Parameter
Value Result current
nothing
false
local version ID »2021-03-30«
Minimal version version ID required at least
date in ISO format

It will be compared whether the current local implementation matches this version or later.

  • empty, if minimal version not achieved
  • 2001-01-01 → »2021-03-30«
  • 2099-01-01 → »«
wikidata version ID of global upstream
  • version ID at Wikidata
  • local, if not found there
»2021-03-30«
item ID of the Wikidata item
  • empty if not defined
  • Q97313076
~ Corresponding version ID locally and registered at Wikidata
  • empty, if up to date
  • version ID at Wikidata, if not equal
»«
@ Is the current (module) page linked correctly with Wikidata item?
  • empty, if linked to the item which is supposed
  • Iitem ID, if not
»Q97313076«
The return value is in template programming empty or under Lua false, otherwis a non-empty string as described.

Nowhere than by Vorlage:Phab.

Parameters for template[Quelltext bearbeiten]

Abstract links to source code, bug tickets and other pages in MediaWiki software administration
anchorAnchor
fragment number of a task contribution (digits only)
BugzillaBugzilla
Bugzilla number, maybe with fragment number of comment
media fileFile
File number (with or without 'F') – *not* 'file='
mockupMock
Mock number (with or without 'M')
link titleShow
displayed link title for tasks; and File, Mock etc.
task (bug)Task
Task number (with or without 'T'), maybe with number of a comment
revisionbranch
revision ID, like 'REL1_20' or intermediate (40 hex)
commitcommit
survey about a commit (40 chars hexcode [low])
commit diffcommitdiff
diff by a commit (40 chars hexcode [low])
diffdiff
diff to current revision (HEAD); referenced revision like at branch=
pathdir
path to a folder or directory
path sourcefile
path to a single source code – *not* 'File='
historyhistory
revision history for file, directory, project (provide 'history=1')
line numberline
line number in source code (digits only)
path plainplain
path to a single plain text; mostly ASCII notes like README
repositoryproject
single source code project ('repository'). Default: mediawiki/core
link title sourcetitle
displayed link title for source code issues
-reserved- 1Countdown
to be assigned later
-reserved- 2Differential
to be assigned later
-reserved- 3Gerrit
to be assigned later
-reserved- 4Join
to be assigned later
-reserved- 5Paste
to be assigned later
-reserved- 6Review
to be assigned later

Abstract links to source code, bug tickets and other pages in MediaWiki software administration

Vorlagenparameter

ParameterBeschreibungTypStatus
anchorAnchor

fragment number of a task contribution (digits only)

Zahlenwertoptional
BugzillaBugzilla

Bugzilla number, maybe with fragment number of comment

Einzeiliger Textoptional
media fileFile

File number (with or without 'F') – *not* 'file='

Einzeiliger Textoptional
mockupMock

Mock number (with or without 'M')

Einzeiliger Textoptional
link titleShow

displayed link title for tasks; and File, Mock etc.

Einzeiliger Textoptional
task (bug)Task

Task number (with or without 'T'), maybe with number of a comment

Einzeiliger Textoptional
revisionbranch

revision ID, like 'REL1_20' or intermediate (40 hex)

Einzeiliger Textoptional
commitcommit

survey about a commit (40 chars hexcode [low])

Einzeiliger Textoptional
commit diffcommitdiff

diff by a commit (40 chars hexcode [low])

Einzeiliger Textoptional
diffdiff

diff to current revision (HEAD); referenced revision like at branch=

Einzeiliger Textoptional
pathdir

path to a folder or directory

Einzeiliger Textoptional
path sourcefile

path to a single source code – *not* 'File='

Einzeiliger Textoptional
historyhistory

revision history for file, directory, project (provide 'history=1')

Wahrheitswertoptional
line numberline

line number in source code (digits only)

Zahlenwertoptional
path plainplain

path to a single plain text; mostly ASCII notes like README

Einzeiliger Textoptional
repositoryproject

single source code project ('repository'). Default: mediawiki/core

Einzeiliger Textoptional
link title sourcetitle

displayed link title for source code issues

Einzeiliger Textoptional
-reserved- 1Countdown

to be assigned later

Einzeiliger Textveraltet
-reserved- 2Differential

to be assigned later

Einzeiliger Textveraltet
-reserved- 3Gerrit

to be assigned later

Einzeiliger Textveraltet
-reserved- 4Join

to be assigned later

Einzeiliger Textveraltet
-reserved- 5Paste

to be assigned later

Einzeiliger Textveraltet
-reserved- 6Review

to be assigned later

Einzeiliger Textveraltet

Functions for Lua modules (API)[Quelltext bearbeiten]

test(a)
Interface to unit tests.
  1. a
    table; simulated template parameter list
Return string with external link(s) in [brackets].

Dependencies[Quelltext bearbeiten]

None.