017c9916b6c0fd16700659f350d3b463536bc388
[atutor.git] / mods / wiki / fragments / patches / uploadedfilenames
1 This patch will add the orignial (client side) filename to the internal://
2 string generated by the binary upload functions. Usually these database
3 names only carry the md5 sum of the uploaded files content (which is good,
4 because no file can be uploaded twice).
5 You will get more readable filenames with db_flat_files, but this also
6 introduces a security risk because the client (and the users) define the
7 database filename.
8
9
10 - edit ewiki.php
11 - find the "function ewiki_binary_save_image("
12 - go the the code block "#-- generate db file name"
13 - after the line "$md5sum = md5($content);"
14   insert following line:
15
16       $md5sum = $add_meta["Content-Location"] . "." . $md5sum;
17
18 - (alternatively you could replace the first "$md5sum = ..." line)