Page MenuHomePhabricator

Provide method to store API/DB information for interwiki sites
Closed, ResolvedPublic

Description

Author: tisane2718

Description:
As suggested at http://www.mediawiki.org/wiki/User:Peter17/Reasonably_efficient_interwiki_transclusion#Adding_fields_to_the_interwiki_table . This will also help with other interwiki integration projects. The alternative is to use configuration settings arrays in InitialiseSettings.php/LocalSettings.php.


Version: unspecified
Severity: enhancement

Details

Reference
bz23999

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:08 PM
bzimport set Reference to bz23999.
bzimport added a subscriber: Unknown Object (MLST).

tisane2718 wrote:

I guess this field should be a varchar(255) binary?

Generalizing this bug (which is actually one of two things discussed in bug 14024, but we never split it off).

What we need is to expand the Interwiki class to give us information about other wikis API urls (or potentially DB info, if they're in a farm like Wikimedia). We can store this information in the interwiki table (for most people) and the interwiki cache (for Wikimedia).

Configuring this stuff in LocalSettings is a Bad Idea because we already store interwiki data somewhere, so it makes sense to put it where that already is.

tisane2718 wrote:

On second thought, might it not be better to, instead of adding a bunch of fields to the interwiki table, just add a field that contains an integer that is the primary key of another table of data about remote wikis? I see a couple advantages to that:
(1) Some wikis will have more than one interwiki prefix, so this avoids the need to have the same remote wiki data in more than one row of the interwiki table.
(2) Especially for other interwiki integration purposes besides interwiki transclusion, a primary key is a better unique identifier than a database name because there may be more than one wiki on the same wiki farm using the same database, and prefixing tables using $wgDBprefix. See http://www.mediawiki.org/wiki/Extension_talk:InterwikiIntegration#Wiki_identifier

  • This bug has been marked as a duplicate of bug 20646 ***