-
Bug
-
Resolution: Fixed
-
Minor
-
3.7.5, 3.7.7, 3.8.2, 3.8.4, 3.9, 3.9.1
-
MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
-
MOODLE_401_STABLE, MOODLE_402_STABLE
-
MDL-68435-401 -
Customfield textarea lib.php file implements function custofield_textarea_pluginfile. In this function file is served by calling send_file function with wrong params. This causes that served file name is always 86400.
Function call in customfield/field/textarea/lib.php looks like this:
send_file($file, 86400, 0, $forcedownload, $options);
Actual send_file function expects such params:
function send_file($path, $filename, $lifetime = null , $filter=0, $pathisstring=false, $forcedownload=false, $mimetype='',
$dontdie=false, array $options = array())
Function call in customfield/field/textarea/lib.php should be:
send_file($file, $filename, 86400, 0, false, $forcedownload, '', false, $options);