MDL-33543 fix mod_data E_STRICT issue when adding fields with file size limits

This commit is contained in:
Petr Skoda 2012-06-10 10:05:59 +02:00
parent fcbf68fd05
commit 8d475fe4fe
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@
<?php echo get_string('maxsize', 'data'); ?></label></td>
<td class="c1">
<?php
$course->maxbytes = $DB->get_field('course', 'maxbytes', array('id'=>$this->data->course));
$course = $DB->get_record('course', array('id'=>$this->data->course));
$choices = get_max_upload_sizes($CFG->maxbytes, $course->maxbytes);
echo html_writer::select($choices, 'param3', $this->field->param3, false, array('id' => 'param3'));
?>

View File

@ -44,7 +44,7 @@
<?php echo get_string('maxsize', 'data'); ?></label></td>
<td class="c1">
<?php
$course->maxbytes = $DB->get_field('course', 'maxbytes', array('id'=>$this->data->course));
$course = $DB->get_record('course', array('id'=>$this->data->course));
$choices = get_max_upload_sizes($CFG->maxbytes, $course->maxbytes);
echo html_writer::select($choices, 'param3', $this->field->param3, false, array('id'=>'param3'));
?>