| 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); |
| 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 |
} |
} |