summaryrefslogtreecommitdiff
path: root/modules/upload
diff options
context:
space:
mode:
Diffstat (limited to 'modules/upload')
-rw-r--r--modules/upload/upload.module9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index 27cff6cd8..411bffebe 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -28,7 +28,7 @@ function upload_help($path, $arg) {
function upload_theme() {
return array(
'upload_attachments' => array(
- 'arguments' => array('files' => NULL),
+ 'arguments' => array('elements' => NULL),
),
'upload_form_current' => array(
'arguments' => array('form' => NULL),
@@ -347,7 +347,8 @@ function upload_node_view($node, $teaser, $page) {
if (count($node->files)) {
if (!$teaser) {
$node->content['files'] = array(
- '#markup' => theme('upload_attachments', $node->files),
+ '#files' => $node->files,
+ '#theme' => 'upload_attachments',
'#weight' => 50,
);
}
@@ -442,10 +443,10 @@ function upload_node_rss_item($node) {
*
* @ingroup themeable
*/
-function theme_upload_attachments($files) {
+function theme_upload_attachments($elements) {
$header = array(t('Attachment'), t('Size'));
$rows = array();
- foreach ($files as $file) {
+ foreach ($elements['#files'] as $file) {
$file = (object)$file;
if ($file->list && empty($file->remove)) {
$href = file_create_url($file->filepath);