diff -urp listhandler/INSTALL listhandler.new/INSTALL --- listhandler/INSTALL 2006-09-27 01:31:36.000000000 +0200 +++ listhandler.new/INSTALL 2007-12-04 20:59:28.000000000 +0100 @@ -19,7 +19,10 @@ mailalias is considered a good idea. Sender is usually a good choice. This depends on the mailing list software. - Then give as a mailhandler default command: - tid: 123 + type: forum + taxonomy: [123] + promote: 0 + status: 1 where 123 would be the numeric taxonomy id of the forum you created above. diff -urp listhandler/listhandler.info listhandler.new/listhandler.info --- listhandler/listhandler.info 2007-07-10 18:51:10.000000000 +0200 +++ listhandler.new/listhandler.info 2007-12-04 20:59:28.000000000 +0100 @@ -1,4 +1,5 @@ ; $Id $ name = Listhandler description = "Integrate with mailing lists." +version = "5.1-1.0" dependencies = mailhandler diff -urp listhandler/listhandler.install listhandler.new/listhandler.install --- listhandler/listhandler.install 2007-07-10 18:51:10.000000000 +0200 +++ listhandler.new/listhandler.install 2007-12-04 20:59:28.000000000 +0100 @@ -33,7 +33,7 @@ function listhandler_install() { prefix text NOT NULL DEFAULT '', PRIMARY KEY (lid) );"); - break; + break; } } diff -urp listhandler/listhandler.module listhandler.new/listhandler.module --- listhandler/listhandler.module 2007-07-10 18:51:10.000000000 +0200 +++ listhandler.new/listhandler.module 2007-12-12 22:33:36.000000000 +0100 @@ -1,5 +1,4 @@ administer listhandler administer >> listhandler.
'. t('For more information please read the configuration and customization handbook Listhandler page.', array('!listhandler' => 'http://www.drupal.org/handbook/modules/listhandler/')) .'
'; return $output; @@ -75,8 +74,14 @@ function listhandler_admin_settings() { '#options' => array(0 => t('blocked'), 1 => t('active')), '#description' => t('The status of accounts created by listhandler.')); - $form['listhandler_list']['#tree'] = TRUE; - $form['listhandler_prefix']['#tree'] = TRUE; + $form['listhandler_list'] = array( + '#tree' => TRUE, + ); + + $form['listhandler_prefix'] = array( + '#tree' => TRUE, + ); + $result = db_query("SELECT * FROM {mailhandler} WHERE mailto != '' ORDER BY mailto"); while ($mailbox = db_fetch_object($result)) { @@ -84,7 +89,6 @@ function listhandler_admin_settings() { '#value' => ""); $form['listhandler_prefix'][$mailbox->mid] = array( '#type' => 'textfield', - '#title' => $mailbox->mid, '#default_value' => $mailbox->prefix, '#size' => 50, '#maxlength' => 100); @@ -97,7 +101,7 @@ function listhandler_admin_settings() { * Theme call to render the tabular form of mailing lists and prefixes */ -function theme_listhandler_settings($form) { +function theme_listhandler_admin_settings($form) { $output = drupal_render($form['listhandler_from']); $output .= drupal_render($form['listhandler_strip_title']); $output .= drupal_render($form['listhandler_accountstatus']); @@ -121,16 +125,14 @@ function theme_listhandler_settings($for } function listhandler_admin_settings_submit($form_id, &$form_values) { - $edit = $form_values['edit']; - variable_set('listhandler_from', $edit['listhandler_from']); - variable_set('listhandler_strip_title', $edit['listhandler_strip_title']); - variable_set('listhandler_accountstatus', $edit['listhandler_accountstatus']); - if (isset($edit['listhandler_prefix'])) { - foreach ($edit['listhandler_prefix'] as $key => $value) { + variable_set('listhandler_from', $form_values['listhandler_from']); + variable_set('listhandler_strip_title', $form_values['listhandler_strip_title']); + variable_set('listhandler_accountstatus', $form_values['listhandler_accountstatus']); + if (isset($form_values['listhandler_prefix'])) { + foreach ($form_values['listhandler_prefix'] as $key => $value) { db_query("UPDATE {mailhandler} SET prefix = '%s' WHERE mid = %d", $value, $key); } } - drupal_set_message('The configuration options have been saved.'); return system_settings_form_submit($form_id, $form_values); } @@ -209,6 +211,7 @@ function listhandler_comment($edit = arr function listhandler_send_mail($edit) { global $user, $base_url; + $mid=array(); if(!$user->uid) { $edit['name'] = variable_get('anonymous', 'Anonymous'); @@ -265,8 +268,8 @@ function listhandler_send_mail($edit) { $edit['pid']=0; } if($result) {// Parent was sent or received by listhandler - $mid = "References: ". $result->msgid ."\n"; - $mid .= "In-Reply-To: ". $result->msgid ."\n"; + $mid['References'] = $result->msgid; + $mid['In-Reply-To'] = $result->msgid; } //common headers $dir = str_replace("/", ".", substr(strchr(str_replace("http://", "", $base_url), "/"), 1)); @@ -276,7 +279,7 @@ function listhandler_send_mail($edit) { $edit["tid"] = $mbox[2]; // We add tokens to the MID. Replies to comments sent by listhandler can thus be classified easier. $msgid = "