commit 70e7566a3574eb0d131df75619ea2ef66b4b96ac Author: Craig Mickelson Date: Fri Jun 3 15:51:47 2011 -0500 Fix for unset diff --git a/lib/editor/htmlarea/coursefiles.php b/lib/editor/htmlarea/coursefiles.php index 19a4058..4903a2c 100644 --- a/lib/editor/htmlarea/coursefiles.php +++ b/lib/editor/htmlarea/coursefiles.php @@ -215,7 +215,7 @@ // um will take care of error reporting. displaydir($wdir); } else { - $upload_max_filesize = get_max_upload_file_size($CFG->maxbytes); + $upload_max_filesize = get_max_upload_file_size($CFG->maxbytes, $COURSE->maxbytes); $filesize = display_size($upload_max_filesize); $struploadafile = get_string("uploadafile"); diff --git a/lib/editor/htmlarea/popups/insert_image.php b/lib/editor/htmlarea/popups/insert_image.php index 5822ef3..6d4c18e 100644 --- a/lib/editor/htmlarea/popups/insert_image.php +++ b/lib/editor/htmlarea/popups/insert_image.php @@ -10,7 +10,7 @@ @header('Content-Type: text/html; charset=utf-8'); - $upload_max_filesize = get_max_upload_file_size($CFG->maxbytes); + $upload_max_filesize = get_max_upload_file_size($CFG->maxbytes, $COURSE->maxbytes); if ($httpsrequired or (!empty($_SERVER['HTTPS']) and $_SERVER['HTTPS'] != 'off')) { $url = preg_replace('|https?://[^/]+|', '', $CFG->wwwroot).'/lib/editor/htmlarea/';