summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-03-25 16:43:02 +0000
committerDries Buytaert <dries@buytaert.net>2009-03-25 16:43:02 +0000
commit617ccc1da370b1cc8435c27103fdd4da9fd3a906 (patch)
treec4e555ee77a2d1ece43f17826c2057c1bab4eec9
parent3da1418d064224e1be0ae3088d95c35773cb52b4 (diff)
downloadbrdo-617ccc1da370b1cc8435c27103fdd4da9fd3a906.tar.gz
brdo-617ccc1da370b1cc8435c27103fdd4da9fd3a906.tar.bz2
- Patch #373177 by Moshe Weitzman: node upload table should use late rendering.
-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);