MDL-27156 repositories: altered a check as the !empty() test on $PAGE->course was...
authorAndrew Davis <andrew@moodle.com>
Wed, 20 Jun 2012 08:17:12 +0000 (15:17 +0700)
committerAndrew Davis <andrew@moodle.com>
Wed, 20 Jun 2012 08:17:12 +0000 (15:17 +0700)
lib/form/filepicker.php

index a27f015..58253bb 100644 (file)
@@ -76,7 +76,7 @@ class MoodleQuickForm_filepicker extends HTML_QuickForm_input {
             $fpmaxbytes = $options['maxbytes'];
         }
         $coursemaxbytes = 0;
-        if (!empty($PAGE->course)) {
+        if (!empty($PAGE->course->maxbytes)) {
             $coursemaxbytes = $PAGE->course->maxbytes;
         }
         $this->_options['maxbytes'] = get_user_max_upload_file_size($PAGE->context, $CFG->maxbytes, $coursemaxbytes, $fpmaxbytes);