diff options
Diffstat (limited to 'modules/upload')
-rw-r--r-- | modules/upload/upload.module | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/upload/upload.module b/modules/upload/upload.module index 86ed1ba3e..2d1d6aac4 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -60,11 +60,11 @@ function upload_perm() { */ function upload_node_links($node, $build_mode) { $links = array(); - + // Display a link with the number of attachments $num_files = 0; foreach ($node->files as $file) { - if ($file->list) { + if ((object)$file->list) { $num_files++; } } @@ -76,8 +76,9 @@ function upload_node_links($node, $build_mode) { 'fragment' => 'attachments' ); $node->content['links']['upload_attachments'] = array( - '#type' => 'node_links', - '#value' => $links, + '#theme' => 'links', + '#links' => $links, + '#attributes' => array('class' => 'links inline'), ); } } |