Last modified: 2012-11-29 12:40:46 UTC
The Sites class needs a way to get all sites of a given group, e.g. all Wikipedias. It should just return a SiteList instance. No database magic is required, the list can just be filtered programmatically.
The group construct was used to get around a bug, but is now not necessary anymore. If we want this behavior, ie to not be able to make sitelinks to sites outside the group, there should be a decision on it.
AS far as I am aware, there has been a very conscious decision on this. Especially, the constraints we are currently imposing (an item can only have on sitelink per target site, and only one item can link to any given target page) only work for Wikipedia. For other "wiki families" (aka groups), different rules would need to be used. Also, our current way of displaying the target sites is based on their language - that means that the Dutch Wiktionary, Dutch Wikibooks and Dutch Wikipedia would all have the same display name ("Nederlands (nl)"). While we tried to keep the architecture flexible, our current implementation of the sitelink mechanism is built on the assumption that we always link to Wikipedia, or at least something that share the same topic domain and lemma rules as Wikipedia (which includes Commons).
fix submitted as I4c154bc0
Verified in Wikidata demo time for sprint 15