Revert "MDL-44626 files: Show the PHP max upload size instead of 'unlimited'"
authorFrederic Massart <fred@moodle.com>
Tue, 7 Jun 2016 08:58:20 +0000 (16:58 +0800)
committerFrederic Massart <fred@moodle.com>
Thu, 23 Jun 2016 03:51:44 +0000 (11:51 +0800)
lib/moodlelib.php
webservice/tests/externallib_test.php

index c590712..72c623c 100644 (file)
@@ -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);
index 9d98d35..5c80986 100644 (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']);