Manual:MediaWiki.php
Appearance
Outdated translations are marked like this.
| Arquivo do MediaWiki: MediaWiki.php | |
|---|---|
| Localização: | includes/ |
| Código-fonte: | master • 1.45.3 • 1.44.5 • 1.43.8 |
| Classes: | MediaWiki |
Descrição
Esta página está desatualizada. |
Entre outras coisas, este arquivo contém:
- Function
run, called from index.php. Run the current MediaWiki instance, callingcheckMaxLag,main,triggerJobsandrestInPeace. - *
checkMaxLag($maxLag): verificar se o atraso máximo de escravos de banco de dados é maior do que o parâmetromaxlag, e se for o caso, emite uma mensagem de erro. verificar se o atraso máximo de escravos de banco de dados é maior do que a variável $maxLag, e se for o caso, emite uma mensagem de erro. Esta função é utilizada por ApiMain.php. - Function
mainwhich creates a Title object depending on thetitleparameter passed to index.php. If thecuridparameter is passed, it will override thetitle. If thecuridparameter isn't passed and theoldidparameter is passed, it will override thetitleif it's not a special page. - Function
performRequest(before version 1.18 it was calledperformRequestForTitle, and before version 1.16 it was calledinitialize) which does the most of the work. It:- Checks for invalid titles, or read permission errors
- Performs interwiki redirects and canonical redirects
- If it's a special page, calls the special page code
- Calls
initializeArticle, and - Calls
performActionifinitializeArticlereturned an article, or - Calls
redirectifinitializeArticlereturned a string.
- Function
initializeArticle, which creates an Article object from the Title given. Then it checks if it is a redirect and if it's the case, recreate another Article from the target of the redirect and changes$wgTitle. It can return either:- An article object, which will be passed
performActionto execute the requested action - A string if it's an interwiki redirect or a redirect to a special page
- An article object, which will be passed
- Function
performAction(called byperformRequest) which performs most actions, including creating the HTML. For example, in the case of viewing a page, function "view" in Article.php is called. - Function
restInPeace(called byrun) which does the following:- * Faz todas as atualizações deferidas.
- Commit any database transactions
- Function
triggerJobs(doJobsbefore 1.23), which runs zero, one or more jobs from the Job queue, depending on$wgJobRunRate. Called fromrun(it was called fromrestInPeacebefore 1.23).
ArticleFromTitle(introduzido na 1.8) now is moved into Article.phpMediaWikiPerformAction(introduzido na 1.12)UnknownAction(obsoleto na versão 1.19)(removido na 1.33)InitializeArticleMaybeRedirect(introduzido na 1.13)CustomEditor(introduzido na 1.9.1) now is moved into EditAction.phpBeforeInitialize(introduzido na 1.16)