Before I respond to the recent new ideas, concepts and suggestions. I'd like to explain a few things about the backend (atleast the way it's currently planned to be)
The mw_authors table contains unique authors by either a name or a userid. And optionally a custom attribution can be given (fallback to authorname, user real_name or user_name) Also optionally a url can be given (fallback to nothing or userpage).
The mw_license table contains the different licenses a wiki allows to be used. Their canonical name (eg. "GFDL", "CC-BY-SA-3.0" etc.), url to legal code and usage count[1].
mw_file_props is a table that keeps previous versions of file_props as well. And is linked to mw_revision by fp_id in rev_fileprops_id (like mw_text is linked in rev_text_id).
Both authors and licenses are uniquely identified by their id. This makes it easy to change stuff later on in an AuthorManager (eg. different url, username change etc.). The texts and complete titles of the licenses are stored in interface messages (for internationalization). MediaWiki:License-<uniq>-text could for example contain {{Cc-by-sa-3.0|attribution=$2}} on Wikimedia Commons.
-
If we store the links in the wikitext (like {{#fileauthor:}} and {{#filelicense:}}, the advantages are basically two things: 1) It has all features of editing and revisioning (better history, edit conflict, diff view, etc.) 2) No need for a revisionized mw_file_props, we can store the current values in mw_page_props
Possible down side is that a diff like - {{#fileauthor:2}} {{filelicense:12}} + {{#fileauthor:10}} {{#fileauthor:12}} {{#filelicense: doesn't mean very much. I.m.h.o The solution is not to store the actual names in wikitext so that the diffs are better, but to either not store it in wikitext at all, or customize the behaviour everywhere: * edit form: extract parserfunction calls from wikitext before anything else, and put it in seperate form elements * diff view: get the names of those authors and licenses and somehow include it in the diff view This could be done a bit like AbuseFilter's diff between filter versions (ie. before "Line 1", would be "Author" and "License") * saving form: convert back to {{#parserfunction:}} calls and prepending it to wikitext * action=raw: ? * action=render: ? * api-parse: ? right now I think storing it in wikitext and customizing it everywhere like shown above is not worth the trouble and would likely bring it's own troubles. Keeping it seperate from wikitext is more work once but I think it pays off. But again, nothing is final yet. Everything is possible.
-- Krinkle
[1]: The usage count (mw_license.lic_count) is a bit like edit count (increased/decreased when saving files)