on demand release 2.5beta+
[moodle.git] / repository / upgrade.txt
CommitLineData
72b33964
DP
1This files describes API changes in /repository/ repository system,
2information provided here is intended especially for developers. Full
3details of the repository API are available on Moodle docs:
4http://docs.moodle.org/dev/Repository_API
5
d7d69396
FM
6=== 2.5 ===
7
8* repository::append_suffix() has been deprecated, use repository::get_unused_filename() if you need
9 to get a file name which has not yet been used in the draft area.
10
31581ae6
FM
11* contains_private_data() is a new method to determine if a user 'logged in as' another user
12 can access the content of the repository. The default is to return True (no access).
13
14* get_typename() returns the type of repository: dropbox, googledocs, etc...
15
89a9d21a
FM
16* can_be_edited_by_user() encapsulates all the tests to make sure that the current user
17 has the rights to edit the instance of this repository.
18
8a641199
FM
19=== 2.4 ===
20
21* copy_to_area() can receive a new parameter called $areamaxbytes which controls the maximum
22 size of the area the files will be stored in.
23
24* the repositories using the upload() method should implement a check for $areamaxbytes,
25 see repository/upload/lib.php upload() and process_upload() for an example on how handling it.
26
72b33964
DP
27=== 2.3 ===
28
29* instance_config_form() must now be declared static for php5.4 compatibility.
30
31* get_listing() and search() file metadata details are now now more prominently
32 displayed in the interface. Dates and timestamos are now able to be sorted on in
33 the filepicker interface so plugin authors are asked to ensure:
34 - Dates are defined as UNIX timestamps
35 - Filesize is an integer in bytes
36
37* It is recomended to define function get_file_source_info() to provide more rich
38 infromation about the source of a file.
39
40* The API was extended to allow repositories can now support external references, please
41 see http://docs.moodle.org/dev/Repository_API for further details.