User:Lilyuserin/Software/DefaultSettings

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Contact

Email Usertalk

This is a Wikimedia Commons user page. If you find this page on any site other than Wikimedia Commons, you are viewing a mirror site. Be aware that the page may be outdated, and that the user this page belongs to may have no personal affiliation with any site other than Wikimedia Commons itself. The original page is located at https://commons.wikimedia.org/wiki/User:Lilyuserin/Software/DefaultSettings.

العربية  azərbaycanca  беларуская (тарашкевіца)  български  বাংলা  čeština  Deutsch  Deutsch (Sie-Form)  English  Esperanto  español  فارسی  suomi  français  Frysk  galego  עברית  हिन्दी  magyar  հայերեն  Bahasa Indonesia  italiano  日本語  ქართული  한국어  ລາວ  македонски  മലയാളം  Bahasa Melayu  မြန်မာဘာသာ  Nederlands  polski  português  português do Brasil  русский  sicilianu  slovenščina  shqip  svenska  ไทย  Tagalog  Türkçe  українська  Tiếng Việt  简体中文  繁體中文  正體中文(臺灣)  +/−

Wikimedia Commons
Wikimedia Commons
includes/DefaultSettings.php

Das Einfügen der Seite hat hier wenig Sinn, statt dessen einen Link zur Dokumentation auf GitHub

Von diesem Punkt aus kannst du dich durch die komplette MediaWiki-Programmarchitektur arbeiten.

Projekt zur Dokumentation der MediaWiki Architektur gegeben, hier das Ergebnis: Manual:MediaWiki architecture

Execution workflow of a web request

[edit]

index.php is the main access point for MediaWiki, and handles most requests processed by the application servers (i.e. requests that were not served by the caching infrastructure; see below). The code executed from index.php performs security checks, loads default configuration settings from includes/DefaultSettings.php, guesses configuration with includes/Setup.php and then applies site settings contained in LocalSettings.php. It then instantiates a MediaWiki object ($mediawiki), and creates a Title object ($wgTitle) depending on the title and action parameters from the request.

index.php can take a variety of action parameters in the URL request; the default action is view, which shows the regular view of an article's content. For example, the request https://en.wikipedia.org/w/index.php?title=Apple&action=view displays the content of the article "Apple" on the English Wikipedia. Other frequent actions include edit (to open an article for editing), submit (to preview or save an article), history (to show an article's history) and watch (to add an article to the user's watchlist). Administrative actions include delete (to delete an article) and protect (to prevent edits to an article).

MediaWiki::performRequest() is then called to handle most of the URL request. It checks for bad titles, read restrictions, local interwiki redirects, and redirect loops, and determines whether the request is for a normal or a special page.

Normal page requests are handed over to MediaWiki::initializeArticle(), to create an Article object for the page ($wgArticle), and then to MediaWiki::performAction(), which handles "standard" actions. Once the action has been completed, MediaWiki::finalCleanup() finalizes the request by committing DB transactions, outputting the HTML and launching deferred updates through the job queue. MediaWiki::restInPeace() commits the deferred updates and closes the task gracefully.

If the page requested is a Special page (i.e., not a regular wiki content page, but a special software-related page such as Statistics), SpecialPageFactory::executePath is called instead of initializeArticle(); the corresponding PHP script is then called. Special pages can do all sorts of magical things, and each has a specific purpose, usually independent of any one article or its content. Special pages include various kinds of reports (recent changes, logs, uncategorized pages) and wiki administration tools (user blocks, user rights changes), among others. Their execution workflow depends on their function.

Many functions contain profiling code, which makes it possible to follow the execution workflow for debugging, if profiling is enabled. Profiling is done by calling the wfProfileIn and wfProfileOut functions to respectively start and stop profiling a function; both functions take the function's name as a parameter. On Wikimedia sites, profiling is done for a percentage of all requests, to preserve performance. MediaWiki sends UDP packets to a central server that collects them and produces profiling data.

Magic Words

[edit]

Definition der Magic Words auf GitHub

MagicWord Array auf GitHub

Magic Words Help

Manual Magic Words

Die Standard Magic Words sind in der Datei CoreParserFunctions.php definiert. Diese befindet sich um Unterverzeichnis parser des Include-Verzeichnisses.

Wenn MediaWiki Text zwischen zwei geschweiften Doppelklammern findet ({{XXX ...}}), muss es entscheiden, ob es sich um eine Variable, eine Parser-Funktion oder um eine Vorlage handelt.

Existiert eine Magic Word ID? Zunächst versucht MediaWiki, XXX in eine Magic Word ID zu übersetzen. Die Übersetzungstabelle ist durch $magicWords definiert.

Variable im Handbuch von MediaWiki sind nichts anderes als die Magic Words, praktisch fix verdrahtete Vorlagen ohne Parameter.

ParserGetVariableValueSwitch


Unterseiten
Links auf diese Seite
Alle Lilyuserin-Seiten