Revert "MDL-44626 files: Show the PHP max upload size instead of 'unlimited'"

This reverts commit 6f0768618a.
This commit is contained in:
Frederic Massart
2016-06-23 12:33:04 +08:00
parent f31567294d
commit 89bacb163f
2 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -6305,7 +6305,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);
+1 -3
View File
@@ -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']);