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

Diff of /contributions/modules/og2list/og2list.module

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

revision 1.107, Sun Aug 5 12:27:09 2007 UTC revision 1.108, Sun Aug 5 12:30:19 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: og2list.module,v 1.106 2007/05/07 11:54:05 killes Exp $  // $Id: og2list.module,v 1.107 2007/08/05 12:27:09 killes Exp $
3    
4  // Defines for outgoing mail  // Defines for outgoing mail
5  define('OG2LIST_OUTGOING_NOT_SENT', 1);  define('OG2LIST_OUTGOING_NOT_SENT', 1);
# Line 531  function og2list_send_mail($edit) { Line 531  function og2list_send_mail($edit) {
531    foreach($edit['og_nids'] as $og) {    foreach($edit['og_nids'] as $og) {
532      $node = node_load($og);      $node = node_load($og);
533      $subject = $node->og2list_subject_prefix .' '. $subject;      $subject = $node->og2list_subject_prefix .' '. $subject;
534      db_query("INSERT INTO {og2list_outgoing_content} (to_name, to_address, from_name, from_address, subject, msgid, body, is_node, id) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d)", $edit['ogs'][$og]['name'], $edit['ogs'][$og]['address'], $edit['name'], $edit['mail'], $subject, $msg_id, "<html><body>$body</body></html>", $edit['cid'] ? 0 : 1, $edit['cid'] ? $edit['cid'] : $edit['nid']);      $mid = db_next_id("{og2list_outgoing_content}_mid");
535      $mid = mysql_insert_id();      db_query("INSERT INTO {og2list_outgoing_content} (mid, to_name, to_address, from_name, from_address, subject, msgid, body, is_node, id) VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d)", $mid, $edit['ogs'][$og]['name'], $edit['ogs'][$og]['address'], $edit['name'], $edit['mail'], $subject, $msg_id, "<html><body>$body</body></html>", $edit['cid'] ? 0 : 1, $edit['cid'] ? $edit['cid'] : $edit['nid']);
536    
537      // see og2list.install for status codes      // see og2list.install for status codes
538      $result = db_query('INSERT INTO {og2list_outgoing_arguments} (mid, nid, timestamp, status, uid) VALUES (%d, %d, %d, %d, %d)', $mid, $og, time(), $node->og2list_ml_status ? (($node->og2list_ml_moderate || ($status == 0)) ? OG2LIST_OUTGOING_MODERATED : OG2LIST_OUTGOING_NOT_SENT) : OG2LIST_OUTGOING_POSTPONED, $account->uid);      $result = db_query('INSERT INTO {og2list_outgoing_arguments} (mid, nid, timestamp, status, uid) VALUES (%d, %d, %d, %d, %d)', $mid, $og, time(), $node->og2list_ml_status ? (($node->og2list_ml_moderate || ($status == 0)) ? OG2LIST_OUTGOING_MODERATED : OG2LIST_OUTGOING_NOT_SENT) : OG2LIST_OUTGOING_POSTPONED, $account->uid);
539    }    }

Legend:
Removed from v.1.107  
changed lines
  Added in v.1.108

  ViewVC Help
Powered by ViewVC 1.1.2