diff --git a/repository/lib.php b/repository/lib.php index 3f2e4ffeaad..978d4abebab 100644 --- a/repository/lib.php +++ b/repository/lib.php @@ -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); diff --git a/repository/upgrade.txt b/repository/upgrade.txt index 19695c4bcb4..5b33b2c3d80 100644 --- a/repository/upgrade.txt +++ b/repository/upgrade.txt @@ -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).