From 4f9b94fdd52e978a29cc3c09bc9240ad8a206076 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Tue, 7 Jun 2016 16:58:20 +0800 Subject: [PATCH] Revert "MDL-44626 files: Show the PHP max upload size instead of 'unlimited'" This reverts commit 6f0768618a38c11eca90a97c0dff31ec8ce434d1. --- lib/moodlelib.php | 2 +- webservice/tests/externallib_test.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index c59071249c1..72c623cd6d5 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -6311,7 +6311,7 @@ function get_user_max_upload_file_size($context, $sitebytes = 0, $coursebytes = } if (has_capability('moodle/course:ignorefilesizelimits', $context, $user)) { - return get_max_upload_file_size(USER_CAN_IGNORE_FILE_SIZE_LIMITS); + return USER_CAN_IGNORE_FILE_SIZE_LIMITS; } return get_max_upload_file_size($sitebytes, $coursebytes, $modulebytes); diff --git a/webservice/tests/externallib_test.php b/webservice/tests/externallib_test.php index 9d98d35a77e..5c809860edb 100644 --- a/webservice/tests/externallib_test.php +++ b/webservice/tests/externallib_test.php @@ -151,9 +151,7 @@ class core_webservice_externallib_testcase extends externallib_advanced_testcase $siteinfo = external_api::clean_returnvalue(core_webservice_external::get_site_info_returns(), $siteinfo); $this->assertEquals(0, $siteinfo['userquota']); - - // The max_size is dependant upon the post_max_size, and upload_max_filesize values in php.ini. - $this->assertEquals(get_max_upload_file_size(USER_CAN_IGNORE_FILE_SIZE_LIMITS), $siteinfo['usermaxuploadfilesize']); + $this->assertEquals(USER_CAN_IGNORE_FILE_SIZE_LIMITS, $siteinfo['usermaxuploadfilesize']); $this->assertEquals(true, $siteinfo['usercanmanageownfiles']); $this->assertEquals(HOMEPAGE_SITE, $siteinfo['userhomepage']); -- 2.43.0