Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-39118 - mod_data: removed areamaxbytes option for uploading files…

… and images.

Setting the maximum size for a file or picture field to the course upload limit
would send a value of 0 to the file picker. This patch checks for this 0 value
and handles it appropriately.
  • Loading branch information...
commit e06d54289d7203cfb5476dc6af51d3d043e0e3ba 1 parent 3a8c438
@abgreeve abgreeve authored
View
1  mod/data/field/file/field.class.php
@@ -71,7 +71,6 @@ function display_add_field($recordid=0) {
$html .= '<input type="hidden" name="field_'.$this->field->id.'_file" value="'.$itemid.'" />';
$options = new stdClass();
- $options->areamaxbytes = $this->field->param3;
$options->maxbytes = $this->field->param3;
$options->maxfiles = 1; // Limit to one file for the moment, this may be changed if requested as a feature in the future.
$options->itemid = $itemid;
View
1  mod/data/field/picture/field.class.php
@@ -75,7 +75,6 @@ function display_add_field($recordid=0) {
$str .= '</noscript>';
$options = new stdClass();
- $options->areamaxbytes = $this->field->param3;
$options->maxbytes = $this->field->param3;
$options->maxfiles = 1; // Only one picture permitted.
$options->itemid = $itemid;
Please sign in to comment.
Something went wrong with that request. Please try again.