mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-54785 files: Deprecate the support for $usepost and related
This commit is contained in:
parent
4f9b94fdd5
commit
df52c272cf
@ -6260,9 +6260,10 @@ function valid_uploaded_file($newfile) {
|
||||
* @param int $sitebytes Set maximum size
|
||||
* @param int $coursebytes Current course $course->maxbytes (in bytes)
|
||||
* @param int $modulebytes Current module ->maxbytes (in bytes)
|
||||
* @param bool $unused This parameter has been deprecated and is not used any more.
|
||||
* @return int The maximum size for uploading files.
|
||||
*/
|
||||
function get_max_upload_file_size($sitebytes=0, $coursebytes=0, $modulebytes=0) {
|
||||
function get_max_upload_file_size($sitebytes=0, $coursebytes=0, $modulebytes=0, $unused = false) {
|
||||
|
||||
if (! $filesize = ini_get('upload_max_filesize')) {
|
||||
$filesize = '5M';
|
||||
@ -6301,9 +6302,11 @@ function get_max_upload_file_size($sitebytes=0, $coursebytes=0, $modulebytes=0)
|
||||
* @param int $coursebytes Current course $course->maxbytes (in bytes)
|
||||
* @param int $modulebytes Current module ->maxbytes (in bytes)
|
||||
* @param stdClass $user The user
|
||||
* @param bool $unused This parameter has been deprecated and is not used any more.
|
||||
* @return int The maximum size for uploading files.
|
||||
*/
|
||||
function get_user_max_upload_file_size($context, $sitebytes = 0, $coursebytes = 0, $modulebytes = 0, $user = null) {
|
||||
function get_user_max_upload_file_size($context, $sitebytes = 0, $coursebytes = 0, $modulebytes = 0, $user = null,
|
||||
$unused = false) {
|
||||
global $USER;
|
||||
|
||||
if (empty($user)) {
|
||||
|
@ -4,6 +4,9 @@ information provided here is intended especially for developers.
|
||||
=== 3.2 ===
|
||||
|
||||
* New option 'blanktarget' added to format_text. This option adds target="_blank" to links
|
||||
* The parameter $usepost of the following functions has been deprecated and is not used any more:
|
||||
- get_max_upload_file_size()
|
||||
- get_user_max_upload_file_size()
|
||||
|
||||
=== 3.1 ===
|
||||
|
||||
|
@ -2778,6 +2778,17 @@ abstract class repository implements cacheable_object {
|
||||
public function supports_relative_file() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to indicate if this repository uses post requests for uploading files.
|
||||
*
|
||||
* @deprecated since Moodle 3.2, 3.1.1, 3.0.5
|
||||
* @return bool
|
||||
*/
|
||||
public function uses_post_requests() {
|
||||
debugging('The method repository::uses_post_requests() is deprecated and must not be used anymore.', DEBUG_DEVELOPER);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,10 @@ 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
|
||||
|
||||
=== 3.2 ===
|
||||
|
||||
* The method repository::uses_post_requests() has been deprecated and must not be used anymore.
|
||||
|
||||
=== 3.1 ===
|
||||
|
||||
* The following functions, previously used (exclusively) by upgrade steps are not available
|
||||
|
Loading…
x
Reference in New Issue
Block a user