Skip to content
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...
1 parent 3a8c438 commit e06d54289d7203cfb5476dc6af51d3d043e0e3ba @abgreeve abgreeve committed Apr 16, 2013
Showing with 0 additions and 2 deletions.
  1. +0 −1 mod/data/field/file/field.class.php
  2. +0 −1 mod/data/field/picture/field.class.php
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;

0 comments on commit e06d542

Please sign in to comment.
Something went wrong with that request. Please try again.