From e06d54289d7203cfb5476dc6af51d3d043e0e3ba Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Tue, 16 Apr 2013 10:05:17 +0800 Subject: [PATCH] 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. --- mod/data/field/file/field.class.php | 1 - mod/data/field/picture/field.class.php | 1 - 2 files changed, 2 deletions(-) diff --git a/mod/data/field/file/field.class.php b/mod/data/field/file/field.class.php index 6e81ff5e35d..bc7b8778654 100644 --- a/mod/data/field/file/field.class.php +++ b/mod/data/field/file/field.class.php @@ -71,7 +71,6 @@ class data_field_file extends data_field_base { $html .= ''; $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; diff --git a/mod/data/field/picture/field.class.php b/mod/data/field/picture/field.class.php index 3e2ee7e4003..63ed44038a3 100644 --- a/mod/data/field/picture/field.class.php +++ b/mod/data/field/picture/field.class.php @@ -75,7 +75,6 @@ class data_field_picture extends data_field_base { $str .= ''; $options = new stdClass(); - $options->areamaxbytes = $this->field->param3; $options->maxbytes = $this->field->param3; $options->maxfiles = 1; // Only one picture permitted. $options->itemid = $itemid;