Juan Leyva 460897052e MDL-54869 files: Create new required functions
This was a complex change requiring three new functions:
file_merge_files_from_draft_area_into_filearea - To just add files from a draft area into a real one (just adding or updating, not deleting)
file_merge_draft_area_into_draft_area - To merge files from two draft areas, used by the latest for creating a draft area with all the original files plus the new ones.
file_overwrite_existing_draftfile - Required to update existing files not losing metadata or references.

The whole process is the following:

    User uploads a file (upload.php)
    Client gets a new draftid A containing the file only (return of upload.php)
    Client requests to merge that draftid in the user's private files (core_user_add_user_private_files)
    Server prepares a new UNUSED draftid B from existing area
    Server merges A into B
    Server saves the draft B into the final area
2016-07-05 09:01:34 +01:00
..
2016-06-17 09:03:18 +01:00
2015-09-30 11:41:08 +08:00
2016-05-24 09:02:36 +08:00