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

Diff of /contributions/modules/actions/actions.module

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

revision 1.38, Tue Apr 29 20:00:33 2008 UTC revision 1.39, Mon May 5 15:08:38 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: actions.module,v 1.37 2008/04/29 19:31:27 jvandyk Exp $  // $Id: actions.module,v 1.38 2008/04/29 20:00:33 jvandyk Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 1134  function system_send_email_action($objec Line 1134  function system_send_email_action($objec
1134        // in $context.        // in $context.
1135        $node = $context['node'];        $node = $context['node'];
1136        break;        break;
     // The comment hook provides nid, in $context.  
1137      case 'comment':      case 'comment':
1138          // The comment hook provides nid, in $context.
1139        $comment = $context['comment'];        $comment = $context['comment'];
1140        $node = node_load($comment->nid);        $node = node_load($comment->nid);
1141        break;        break;
# Line 1154  function system_send_email_action($objec Line 1154  function system_send_email_action($objec
1154        }        }
1155        break;        break;
1156      default:      default:
1157        // We are being called directly.        // Check context for node.
1158        $node = $object;        if (!isset($object) && isset($context['node'])) {
1159            $node = $context['node'];
1160          }
1161          else {
1162            // We are being called directly.
1163            $node = $object;
1164          }
1165    }    }
1166    
1167    $recipient = $context['recipient'];    $recipient = $context['recipient'];
# Line 1253  function system_message_action(&$object, Line 1259  function system_message_action(&$object,
1259        // in $context.        // in $context.
1260        $node = $context['node'];        $node = $context['node'];
1261        break;        break;
     // The comment hook also provides the node, in context.  
1262      case 'comment':      case 'comment':
1263          // The comment hook also provides the node, in context.
1264        $comment = $context['comment'];        $comment = $context['comment'];
1265        $node = node_load($comment->nid);        $node = node_load($comment->nid);
1266        break;        break;
# Line 1271  function system_message_action(&$object, Line 1277  function system_message_action(&$object,
1277        );        );
1278        break;        break;
1279      default:      default:
1280        // We are being called directly.        // Check context for node.
1281        $node = $object;       if (!isset($object) && isset($context['node'])) {
1282            $node = $context['node'];
1283          }
1284          else {
1285            // We are being called directly.
1286            $node = $object;
1287          }
1288    }    }
1289    
1290    if (isset($node) && is_object($node)) {    if (isset($node) && is_object($node)) {

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

  ViewVC Help
Powered by ViewVC 1.1.2