';
< $output .= l(image_display($image, $img_size), "node/$node->nid", array('html' => TRUE));
---
> $output .= '
';
> $output .= l(image_display($image, $img_size), "node/$iid", array('html' => TRUE));
364,365d413
<
< return $output;
366a415
> return $output;
372c421,422
< function theme_image_attach_body($node) {
---
> function theme_image_attach_body($node, $iid) {
> $output = '';
378,387c428,433
< $image = node_load($node->iid);
< if (!node_access('view', $image)) {
< // If the image is restricted, don't show it as an attachment.
< return NULL;
< }
< $info = image_get_info(file_create_path($image->images[$img_size]));
<
< $output = '
';
< $output .= l(image_display($image, $img_size), "node/$node->iid", array('html' => TRUE));
< $output .= '
'."\n";
---
> $image = node_load($iid);
> if (!node_access('view', $image)) {
> // If the image is restricted, don't show it as an attachment.
> continue;
> }
> $info = image_get_info(file_create_path($image->images[$img_size]));
389c435,437
< return $output;
---
> $output .= '
';
> $output .= l(image_display($image, $img_size), "node/$iid", array('html' => TRUE));
> $output .= '
'."\n";
390a439
> return $output;