aboutsummaryrefslogtreecommitdiffstats
path: root/includes/title/ForeignTitleFactory.php
Commit message (Collapse)AuthorAgeFilesLines
* Standardise all our class alias deprecation comments for ease of greppingJames D. Forrester2024-03-191-4/+1
| | | | Change-Id: I7f85d931d3b79da23e87b4e5692b2e14be8fcaa0
* Namespace remaining Title-related classes under \MediaWiki\TitleJames D. Forrester2023-09-191-0/+8
| | | | | Bug: T166010 Change-Id: Ia2e5a7367cc8cdbd8a7b845ae2fd5d776ff22891
* title: Remove dated comment about inNamespace(), overall doc cleanupTimo Tijhof2022-01-181-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The Title::inNamespace() method discouraged use of getNamespace() for comparison. This was added 10 years ago in r103893 (commit 3414e91bae), however no such "change" has been made, and the new LinkTarget stable interface and TitleValue class contains the same getNamespace() method, and no warning against its use. My main reason for removing this comment is so that avoid fear against using `in_array()` with TitleValue->getNamespace() which this comment seems to discourage. While Title has plural inNamespaces(), TitleValue does not. This seems fine, as one can simply use in_array for more complex use cases where a range or list is compared against. * Fix Doxygen warnings about invalid or unsupported XML tags such as `<a>`, `<siteinfo>` etc. Rephase or use backtics,. * Fix useless IDE tooltips and Doxygen output by removing empty stubs from method overrides that add no new information, yet obscured the otherwise inherited parent destination which does have useful information. * Clarify that `renderForComment` must not be mixed with other ones. This seems to be how it is intended. Upon realizing that, I think this is unreasonable and should perhaps be removed. For now, I've documented the hack that it seems to exist for. * Consistently use imperative mood when phrasing method docs, and consistently use a brief first line description, and consistently separate it from other paragraphs and annotations with one line break. Change-Id: I7e1819a5d7124c635de84bc64d2371a122195928
* Remove various redundant '@license' tags in file headersTimo Tijhof2018-01-121-1/+0
| | | | | | | | | | | | | Redundant given this is the project-wide license already, especially in file headers that already include the GPL license header. This and other minor fixups based on feedback from Ie0cea0ef5027c7e5. * Add @file where missing. * Move @ingroup and @deprecated from file to class doc where needed. Change-Id: I7067abb7abee1f0c238cb2536e16192e946d8daa
* Proper namespace handling for WikiImporterThis, that and the other2014-12-101-0/+36
Up until now, the import backend has tried to resolve titles in the XML data using the regular Title class. This is a disastrous idea, as local namespace names often do not match foreign namespace titles. There is enough metadata present in XML dumps generated by modern MW versions for the target namespace ID and name to be reliably determined. This metadata is contained in the <siteinfo> and <ns> tags, which (unbelievably enough) was totally ignored by WikiImporter until now. Fallbacks are provided for older XML dump versions which may be missing some or all of this metadata. The ForeignTitle class is introduced. This is intended specifically for the resolution of titles on foreign wikis. In the future, an InterwikiTitle class could be added, which would inherit ForeignTitle and add members for the interwiki prefix and fragment. Factory classes to generate ForeignTitle objects from string data, and Title objects from ForeignTitle objects, are also added. The 'AfterImportPage' hook has been modified so the second argument is a ForeignTitle object instead of a Title (the documentation was wrong, it was never a string). LiquidThreads, SMW and FacetedSearch all use this hook but none of them use the $origTitle parameter. Bug: T32723 Bug: T42192 Change-Id: Iaa58e1b9fd7287cdf999cef6a6f3bb63cd2a4778