Talk:Attribution according to CC by-sa

From Wikivoyage Tech

Jump to: navigation, search

[edit] Code in Development

@Mistoffeles & others: I'm improving the structure of the extension. At the moment, my main concern is not security holes (for sure, there are), but finding a structure that needs as less changes in the original MW code as possible. Idealy, the only changes on the MW code is to add some more hooks.

I will tell you here when done. Maybe, already today.

-- Hansm 11:58, 4 October 2006 (CEST)

Done! Now, there are only 2 files that need to be patched. Mostly this is for implementing additional hooks. Furthermore, there is a slight modification of the WikiRevision class in SpecialImport.php that needed to be done.
Now, all of the real code of the extension is in the files includes/SpecialAttribute.php, includes/SpecialRecentAttributions.php and extensions/RDFAttr.php. I will try now to make this code more error prone.
-- Hansm 15:48, 4 October 2006 (CEST)

[edit] Revised

After having revised my hack, I believe that it should be save enough, now. I was pretty enthusiasic to see that the MW DB wrapper functions already do sql-escaping of strings. So it should not be unsave to feed GET- or POST-parameters directly to the wrapper functions.

I also have implemented some more error checking. At the time, the error messages are nothing but just 'error'. This could be improved quite easy.

-- Hansm 17:03, 6 October 2006 (CEST)

[edit] Unsolved Problems

  • At the moment, all RDF code is tranlated into a tree structure py the RDF parser. Then, the cc:Work sub-tree is extracted and partly interpreted. Finaly, the whole cc:Work sub-tree is saved into the DB. I'm not sure if this is the right approach. Maybe it would be better only to save those parts of the cc:Works that are understood by the extension in order to save DB memory and to keep more control on what goes into the DB. At the other hand, different servers use different RDF constructs to say the same things. So, there is the risk that the extension does not understand some RDF dialect and throws an error, although the RDF was perfectly right.
  • Each source work is shown in the RDF/XML output, even if there are different versions of the same source. Is this neccessary? Maybe it would be enough just to show the most recent version of a source work.
  • Every source work may have several other source works which themselves have sources ... and so on. We may get widely branched source work trees. Is this necessary to comply the CC by-sa? I'm not sure. Maybe it would be enough to flatten the tree and simply list all source works and all of its contributors.

-- Hansm 17:03, 6 October 2006 (CEST)

Personal tools
Participation