| 1 |
<?php |
<?php |
| 2 |
// $Id: image_attach.module,v 1.66 2009/09/08 13:14:49 joachim Exp $ |
// $Id: image_attach.module,v 1.67 2009/09/17 19:01:39 joachim Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file image_attach.module |
* @file image_attach.module |
| 382 |
} |
} |
| 383 |
$node->content['image_attach'] = array('#weight' => $weight); |
$node->content['image_attach'] = array('#weight' => $weight); |
| 384 |
if ($teaser_or_body == 'teaser') { |
if ($teaser_or_body == 'teaser') { |
| 385 |
$node->content['image_attach'][$node->iids[0]]['#value'] = theme("image_attach_{$teaser_or_body}", $node, $node->iids[0]); |
// Reliably get the first element: this array is keyed by id rather |
| 386 |
|
// than from 0 when we are showing a node preview. |
| 387 |
|
$first_iid = reset($node->iids); |
| 388 |
|
$node->content['image_attach'][$first_iid]['#value'] = theme("image_attach_{$teaser_or_body}", $node, $first_iid); |
| 389 |
} |
} |
| 390 |
else { |
else { |
| 391 |
$content = ''; |
$content = ''; |