Commit e4c853f8 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Added missing postValue setting in File attributes

parent fbed668f
......@@ -1428,6 +1428,7 @@ class FileAttribute extends Attribute
{
function loadPostValue()
{
$this->postValue = $this->value;
if (!empty($_FILES[$this->getHtmlId()]['name']) && $this->isVisible()) {
if ($_FILES[$this->getHtmlId()]['size'] <= 0) {
msg_dialog::display(_("Error"), sprintf(_("Cannot read uploaded file: %s"), _("file is empty")), ERROR_DIALOG);
......@@ -1494,6 +1495,7 @@ class FileDownloadAttribute extends FileAttribute
function loadPostValue ()
{
if ($this->isVisible()) {
$this->postValue = $this->value;
foreach (array_keys($_POST) as $name) {
if (preg_match('/^download'.$this->getHtmlId().'/', $name)) {
session::set('binary', $this->value);
......@@ -1564,6 +1566,7 @@ class FileTextAreaAttribute extends FileDownloadAttribute
function loadPostValue ()
{
if ($this->isVisible()) {
$this->postValue = $this->value;
foreach (array_keys($_POST) as $name) {
if (preg_match('/^download'.$this->getHtmlId().'/', $name)) {
session::set('binary', $this->value);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment