Commit graph

8 commits

Author SHA1 Message Date
saper
ae1729a24b Skip ImportTest if allow_url_fopen disabled
Workaround for:

Bug: 73283
Change-Id: I7afbf4dba358c89f9ba78042d82c35df1d2258e8
2015-09-24 11:28:32 +00:00
This, that and the other
37b4cd5da2 Proper namespace handling for WikiImporter
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
2014-12-10 22:24:47 +11:00
daniel
da3c19fb17 Change position of <model> and <format> tags in XML dumps.
Bug: 72417
Change-Id: I1d11ce8147cf0bf0018e3931202f533afd4ea93e
2014-10-31 16:49:58 +00:00
Kunal Mehta
4a2ecaa046 Import.php: Use Config instead of globals
Change-Id: I4d1a8c443cfa360c5d388364c580d48fa7124099
2014-10-22 10:35:29 -07:00
umherirrender
6b4c44c2db Add missing @param to function docs
Change-Id: Ib26407bc55dff7969d8a3b1e2ae51751b202d8fb
2014-08-18 16:24:59 +00:00
umherirrender
53c420e278 Fixed spacing
- use tab as indent instead of spaces
- Added space after closures "function"
- Added spaces around string_concat
- Added newline inside empty blocks
- Removed four spaces after comma

Change-Id: I4425b0c6a69b36f40acfea6511b8950cf09ce2b2
2014-07-20 21:41:41 +02:00
umherirrender
2b021dc48a Fixed spacing
- Added/removed spaces around parenthesis
- Added space after switch/if/foreach
- changed else if to elseif

Change-Id: I99cda543e0e077320091addd75c188cb6e3a42c2
2014-07-19 23:12:10 +02:00
Sebastian Brückner
85b695c2ee Correctly parse 'redirect' XML tag during Special:Import.
Bug: 65481
Change-Id: Id9b3b7878b2e7b6fc7a06b163e5bac60e700490e
2014-05-28 16:47:49 +02:00