/[drupal]/contributions/modules/simplenews/simplenews.module
ViewVC logotype

Diff of /contributions/modules/simplenews/simplenews.module

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

revision 1.76.2.104, Sun Dec 28 16:21:54 2008 UTC revision 1.76.2.105, Thu Jan 1 17:06:34 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: simplenews.module,v 1.76.2.103 2008/12/27 23:25:31 sutharsan Exp $  // $Id: simplenews.module,v 1.76.2.104 2008/12/28 16:21:54 sutharsan Exp $
3    
4  /**  /**
5   * @defgroup simplenews   * @defgroup simplenews
# Line 358  function simplenews_nodeapi(&$node, $op, Line 358  function simplenews_nodeapi(&$node, $op,
358      case 'alter':      case 'alter':
359        // Don't replace the tokens when node alter is called by simplenews_mail.        // Don't replace the tokens when node alter is called by simplenews_mail.
360        if (!isset($node->simplenews_mail)) {        if (!isset($node->simplenews_mail)) {
361          global $user;          global $language;
362          $params['node'] = $node;          $params['node'] = $node;
363          $variables = simplenews_mail_tokens($user, $params, $user->language);          $variables = simplenews_mail_tokens($user, $params, $language);
364          $node->body = strtr($node->body, $variables);          if (isset($node->body)) {
365          $node->teaser = strtr($node->teaser, $variables);            $node->body = strtr($node->body, $variables);
366            }
367            if (isset($node->teaser)) {
368              $node->teaser = strtr($node->teaser, $variables);
369            }
370        }        }
371        break;        break;
372      case 'validate':      case 'validate':

Legend:
Removed from v.1.76.2.104  
changed lines
  Added in v.1.76.2.105

  ViewVC Help
Powered by ViewVC 1.1.2