Add "extended" file metadata to API
authorBrian Wolff <bawolff+wn@gmail.com>
Mon, 12 Aug 2013 16:18:29 +0000 (13:18 -0300)
committertgr <tgr.huwiki@gmail.com>
Tue, 29 Oct 2013 17:47:59 +0000 (17:47 +0000)
commitd14178139662d9d1303cd7d40750bed10aab5385
tree0a50abbd04f6ae13f6baeb0a4cf6313142f9c2da
parentb6aa32bf01ec47012a685db26034076159c94dae
Add "extended" file metadata to API

Part of the point of this, is to add a hook to allow extensions to add
their own metadata (I intend to create a companion extension to parse
Commons description pages - I5e6bc45f9751)

It's hoped that this would provide a simple system to get file metadata,
and would be able to return information on any wiki (even without any
extensions installed to provide additional information). So it could
fallback to exif data, if there's no better source of information for
the file available. It's also meant to be done in such a way that, in
the future, when Wikibase is deployed on Commons, it could be integrated
without too much fuss.

marktraceur changed this patch to be a little less heavy-handed: it will
now return unformatted data by default from the API, but there's also a
method for formatting that data in the way that bawolff originally
intended. I'm still trying to figure out if there's much use in that
method, but for now it's not particularly useful.

Change-Id: I77303d8e535fc1c42e14cfb853814e5c434a81ec
docs/hooks.txt
includes/api/ApiQueryImageInfo.php [changed mode: 0644->0755]
includes/filerepo/file/ForeignAPIFile.php [changed mode: 0644->0755]
includes/media/FormatMetadata.php [changed mode: 0644->0755]
includes/media/MediaHandler.php