Last modified: 2012-07-31 15:49:12 UTC
ForeignDBViaLBRepo does not implement fetchImageQuery, this is used by TimedMediaHandler for non local repos. This would be required to embed videos from commons on en.wikipedia.org.
fetchImageQuery() is specific to ForeignAPIRepo. Perhaps TMH should find another backend-agnostic way of doing this?
Is there an overview of what types of backends exist? so far there is isLocal(), both ForeignDBViaLBRepo and ForeignAPIRepo are not local. TMH right branches for local and remote repositories.
If ForeignDBViaLBRepo is used, certainly the info should come from the db not the api. I imagine TMH would want to do something different for each backend (they all have different implementations). It could use instanceof to differentiate them.
Given that this was marked fixed, should probably have some comment linking to a gerrit change (?)
https://gerrit.wikimedia.org/r/#/c/16885/ its done with sub classing ApiQueryAllPages to be able to set the db and using FauxRequest. Ideally core would have a way to pass the target db to ApiBase.