MDL-50272 repository: deprecate base class get_file_size method.

This commit is contained in:
Paul Holden 2023-07-04 16:54:28 +01:00
parent 8dbb6183ff
commit 2974f5aeb6
No known key found for this signature in database
GPG Key ID: A81A96D6045F6164
2 changed files with 7 additions and 1 deletions

View File

@ -1789,9 +1789,12 @@ abstract class repository implements cacheable_object {
*
* @param string $source encoded and serialized data of file
* @return int file size in bytes
*
* @deprecated since Moodle 4.3
*/
public function get_file_size($source) {
// TODO MDL-33297 remove this function completely?
debugging(__FUNCTION__ . ' is deprecated, please do not use it any more', DEBUG_DEVELOPER);
$browser = get_file_browser();
$params = unserialize(base64_decode($source));
$contextid = clean_param($params['contextid'], PARAM_INT);

View File

@ -3,6 +3,9 @@ information provided here is intended especially for developers. Full
details of the repository API are available on Moodle docs:
http://docs.moodle.org/dev/Repository_API
=== 4.3 ===
* The base `repository` class method `get_file_size` has been deprecated and should not be used any more
=== 4.0 ===
* The repository_boxnet has been completely removed.
* The repository_picasa has been completely removed (Picasa is discontinued since 2016).