#157747 by dopry: the files coming from the form are arrays, and need to by casted to objects
parent
c3207e0ec1
commit
f48af90a40
|
@ -459,6 +459,7 @@ function _upload_form($node) {
|
|||
$form['files']['#theme'] = 'upload_form_current';
|
||||
$form['files']['#tree'] = TRUE;
|
||||
foreach ($node->files as $key => $file) {
|
||||
$file = (object)$file;
|
||||
$description = file_create_url($file->filepath);
|
||||
$description = "<small>". check_plain($description) ."</small>";
|
||||
$form['files'][$key]['description'] = array('#type' => 'textfield', '#default_value' => !empty($file->description) ? $file->description : $file->filename, '#maxlength' => 256, '#description' => $description );
|
||||
|
|
Loading…
Reference in New Issue