Index: simplenews.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simplenews/simplenews.module,v
retrieving revision 1.154
diff -u -p -r1.154 simplenews.module
--- simplenews.module	30 Sep 2008 20:07:34 -0000	1.154
+++ simplenews.module	27 Oct 2008 21:51:21 -0000
@@ -343,17 +343,17 @@ function simplenews_nodeapi(&$node, $op,
         // Insert node
         $s_status = $send_with_permission ? SIMPLENEWS_STATUS_SEND_PENDING : SIMPLENEWS_STATUS_SEND_NOT;
         db_query("INSERT INTO {simplenews_newsletters} (nid, vid, tid, s_status, s_format, priority, receipt)
-                  VALUES (%d, %d, %d, %d, '%s', %d, %d)", $node->nid, $node->vid, $node->simplenews['tid'], $s_status, $node->simplenews['s_format'], $node->simplenews['priority'], $node->simplenews['receipt']);
+                  VALUES (%d, %d, %d, %d, '%s', %d, %d)", $node->nid, $node->vid, $node->simplenews['tid'], $s_status, $node->simplenews['advanced']['s_format'], $node->simplenews['advanced']['priority'], $node->simplenews['advanced']['receipt']);
         }
       else {
         // Update node
         if ($send_with_permission) {
           db_query("UPDATE {simplenews_newsletters} SET vid = %d, tid = %d, s_status = %d, s_format = '%s', priority = %d, receipt = %d
-          WHERE nid = %d", $node->vid, $node->simplenews['tid'], SIMPLENEWS_STATUS_SEND_PENDING, $node->simplenews['s_format'], $node->simplenews['priority'], $node->simplenews['receipt'], $node->nid);
+          WHERE nid = %d", $node->vid, $node->simplenews['tid'], SIMPLENEWS_STATUS_SEND_PENDING, $node->simplenews['advanced']['s_format'], $node->simplenews['advanced']['priority'], $node->simplenews['advanced']['receipt'], $node->nid);
         }
         else {
           db_query("UPDATE {simplenews_newsletters} SET tid = %d, s_format = '%s', priority = %d, receipt = %d
-          WHERE nid = %d", $node->simplenews['tid'], $node->simplenews['s_format'], $node->simplenews['priority'], $node->simplenews['receipt'], $node->nid);
+          WHERE nid = %d", $node->simplenews['tid'], $node->simplenews['advanced']['s_format'], $node->simplenews['advanced']['priority'], $node->simplenews['advanced']['receipt'], $node->nid);
         }
       }
 
@@ -365,8 +365,8 @@ function simplenews_nodeapi(&$node, $op,
           foreach ($translations as $translation) {
             db_query("UPDATE {simplenews_newsletters} SET s_status = %d, s_format = '%s', priority = %d, receipt = %d
               WHERE nid = %d",
-              SIMPLENEWS_STATUS_SEND_PENDING, $node->simplenews['s_format'], $node->simplenews['priority'],
-              $node->simplenews['receipt'], $translation->nid);
+              SIMPLENEWS_STATUS_SEND_PENDING, $node->simplenews['advanced']['s_format'], $node->simplenews['advanced']['priority'],
+              $node->simplenews['advanced']['receipt'], $translation->nid);
           }
         }
       }
@@ -1383,7 +1383,7 @@ function simplenews_send_test($node, $ac
         // If mimemail module is installed ALL emails are send via this module.
         // drupal_mail() builds the content of the email but does NOT send.
         $message = drupal_mail('simplenews', 'test', $account->mail, $subscription->language, $params, $from['formatted'], FALSE);
-        $plain = $message['params']['context']['node']->simplenews['s_format'] == 'plain';
+        $plain = $message['params']['context']['node']->simplenews['advanced']['s_format'] == 'plain';
         $result['result'] = mimemail(
           $message['from'],
           $message['to'],
@@ -1532,7 +1532,7 @@ function simplenews_mail($key, &$message
       // before conversion to plain text.
       $variables =  user_mail_tokens($context['account'], $context['account']->language);
       $body = strtr($body, $variables);
-      if ($context['node']->simplenews['s_format'] == 'plain') {
+      if ($context['node']->simplenews['advanced']['s_format'] == 'plain') {
         $body = simplenews_html_to_text($body);
       }
       $message['body']['body'] = $body;
@@ -1544,7 +1544,7 @@ function simplenews_mail($key, &$message
       else {
         $hash = '';
       }
-      $message['body']['footer'] = theme('simplenews_newsletter_footer', $context['node']->simplenews['s_format'], $hash, $key == 'test', $message['language']);
+      $message['body']['footer'] = theme('simplenews_newsletter_footer', $context['node']->simplenews['advanced']['s_format'], $hash, $key == 'test', $message['language']);
 
       // Add user specific header data.
       $message['headers']['List-Unsubscribe'] = '<'. url('newsletter/confirm/remove/'. $hash, array('absolute' => TRUE)) .'>';
@@ -1641,7 +1641,7 @@ function simplenews_mail_send($nid = NUL
         // If mimemail module is installed ALL emails are send via this module.
         // drupal_mail() builds the content of the email but does NOT send.
         $message = drupal_mail('simplenews', 'node', $subscription->mail, $subscription->language, $params, $params['from']['formatted'], FALSE);
-        $plain = $message['params']['context']['node']->simplenews['s_format'] == 'plain';
+        $plain = $message['params']['context']['node']->simplenews['advanced']['s_format'] == 'plain';
         $message['result'] = mimemail(
           $message['from'],
           $message['to'],
@@ -1898,13 +1898,13 @@ function _simplenews_headers($node, $fro
   $headers = array();
 
   // If receipt is requested, add headers.
-  if ($node->simplenews['receipt']) {
+  if ($node->simplenews['advanced']['receipt']) {
     $headers['Disposition-Notification-To'] = $from;
     $headers['X-Confirm-Reading-To'] = $from;
   }
 
   // Add priority if set.
-  switch ($node->simplenews['priority']) {
+  switch ($node->simplenews['advanced']['priority']) {
     case SIMPLENEWS_PRIORITY_HIGHEST:
       $headers['Priority'] = 'High';
       $headers['X-Priority'] = '1';
