HomePhabricator

Avoid extra API request for the source wiki language
a6dd81d61f42Unpublished

Authored by thiemowmde on May 23 2019, 3:03 PM.

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Avoid extra API request for the source wiki language

What this patch does:

  1. Use the original API request we are doing anyway to request the

language of the file description page from the source wiki.

  1. Store this language code in the ImportDetails object, where it

belongs.

  1. Use that during wikitext cleanup. No need to do anything else. No

site table lookup, no extra API request. All these extra service calls
aren't needed any more in the factory.

Note: I'm introducing another setter in ImportDetails. Most, if not all
these setters should be changed to constructor parameters later. I would
like to do this later to not make this patch here more complicated and
hard to review.

Note: This is intentionally using the normalized "HTML version" of the
language code. These are more likely to have templates, required for
I563d84f (T198607).

Bug: T224122
Change-Id: I230c142831218eb6361d0e41851a7e55566ea9c4

Details

Committed
thiemowmdeMay 24 2019, 10:08 AM
ChangeId
I230c142831218eb6361d0e41851a7e55566ea9c4

Commit No Longer Exists

This commit no longer exists in the repository.