/[drupal]/contributions/modules/image/contrib/image_attach/image_attach.module
ViewVC logotype

Diff of /contributions/modules/image/contrib/image_attach/image_attach.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.67 by joachim, Thu Sep 17 19:01:39 2009 UTC revision 1.68 by joachim, Sat Nov 21 23:16:41 2009 UTC
# Line 1  Line 1 
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
# Line 382  function image_attach_nodeapi(&$node, $o Line 382  function image_attach_nodeapi(&$node, $o
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 = '';

Legend:
Removed from v.1.67  
changed lines
  Added in v.1.68

  ViewVC Help
Powered by ViewVC 1.1.3