#157747 by dopry: the files coming from the form are arrays, and need to by casted to objects

6.x
Gábor Hojtsy 2007-08-16 12:30:24 +00:00
parent c3207e0ec1
commit f48af90a40
1 changed files with 1 additions and 0 deletions

View File

@ -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 );