From 58b0235a72859aa433d743a9f284504f24664857 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 5 Dec 2008 22:18:46 +0000 Subject: - Patch #324313 by catch et al: load multiple nodes and terms at once. --- modules/upload/upload.module | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'modules/upload') diff --git a/modules/upload/upload.module b/modules/upload/upload.module index c4eacc2bd..fce0b2aff 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -300,10 +300,11 @@ function upload_file_delete(&$file) { /** * Implementation of hook_nodeapi_load(). */ -function upload_nodeapi_load(&$node, $teaser) { - if (variable_get("upload_$node->type", 1) == 1) { - $output = array('files' => upload_load($node)); - return $output; +function upload_nodeapi_load($nodes, $types) { + foreach ($nodes as $node) { + if (variable_get("upload_$node->type", 1) == 1) { + $node->files = upload_load($node); + } } } -- cgit v1.2.3