On Tue, Feb 12, 2008 at 3:27 AM, Brion Vibber brion@wikimedia.org wrote:
btongminh@svn.wikimedia.org wrote:
+When using a shared image repository, it is impossible to see within MediaWiki whether a file +is used on one of the slave wikis. On Wikimedia this is handled by the CheckUsage tool on the +toolserver, but it is merely a hack of function that should be built in.
Woohoo! :)
+GlobalUsage creates a new table globalimagelinks, which is basically the same as imagelinks, but +points to the usage on foreign wikis. The field il_from has been replaced by gil_wiki, gil_page +and gil_pagename, which contain respectively the interwiki prefix, page id and page name +including namespace of the linking page. Since the foreign wiki may use different namespaces , +the namespace name needs to be included in the link as well.
One problem here is that at Wikimedia, we currently don't have a complete interwiki prefix map. That is to say, not every wiki can be reached from all other wikis by a unique interwiki prefix, and the defined local interwiki prefix is not unique in the system.
Yes... well maybe it's a good time to introduce something like a full interwiki prefix map :)
For cross-wiki data tables we currently use the database name, which can be internally mapped with reference to the SiteConfiguration array, but it's a bit dirty.
-- brion vibber (brion @ wikimedia.org)
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
I also heart from domas that varchars can't be larger than 255 in MySQL 4, so the gil_pagename thing which is defined varchar(511) may not work... Introduce a separate namespace varchar field?
Some other issues: There is currently no hook that is called when a file is deleted (or at least not documented) and the ArticleDelete hook is not called in the delete function of ApiEdit. That's may be a separate issue though that I sent to the mediawiki-api list.
Bryan