Skip to content

Commit

Permalink
Revert "MDL-44626 files: Show the PHP max upload size instead of 'unl…
Browse files Browse the repository at this point in the history
…imited'"

This reverts commit 6f07686.
  • Loading branch information
Frederic Massart committed Jun 23, 2016
1 parent 048f807 commit 4f9b94f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/moodlelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 1 addition & 3 deletions webservice/tests/externallib_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ public function test_get_site_info() {
$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']);
Expand Down

0 comments on commit 4f9b94f

Please sign in to comment.