Index: listhandler.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/listhandler/listhandler.install,v retrieving revision 1.1 diff -u -b -B -u -F^f -r1.1 listhandler.install --- listhandler.install 26 Sep 2006 23:35:23 -0000 1.1 +++ listhandler.install 15 Jun 2007 15:31:06 -0000 @@ -7,7 +7,7 @@ function listhandler_install() { switch ($GLOBALS['db_type']) { case 'mysql': case 'mysqli': - db_query("CREATE TABLE listhandler ( + db_query("CREATE TABLE {listhandler} ( lid int(10) unsigned not null auto_increment primary key, msgid varchar(255) not null, nid int(10) NOT NULL default '0', @@ -16,10 +16,25 @@ function listhandler_install() { uid int(10) NOT NULL default '0', mid int(10) NOT NULL default '0', tid int(10) NOT NULL default '0', + prefix varchar(255) NOT NULL DEFAULT'', key (lid) ) /*!40100 DEFAULT CHARACTER SET utf8 */;"); - db_query("ALTER TABLE mailhandler ADD prefix varchar(255) not null DEFAULT ''"); break; + case 'pgsql': + db_query("CREATE TABLE {listhandler} ( + lid serial, + msgid text not null, + nid integer NOT NULL default 0, + cid integer NOT NULL default 0, + pid integer NOT NULL default 0, + uid integer NOT NULL default 0, + mid integer NOT NULL default 0, + tid integer NOT NULL default 0, + prefix text NOT NULL DEFAULT '', + PRIMARY KEY (lid) + );"); + break; + } } Index: listhandler.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/listhandler/listhandler.module,v retrieving revision 1.74 diff -u -b -B -u -F^f -r1.74 listhandler.module --- listhandler.module 14 Feb 2007 11:25:57 -0000 1.74 +++ listhandler.module 15 Jun 2007 15:31:07 -0000 @@ -6,20 +6,21 @@ function listhandler_help($section) { switch($section) { case 'admin/help#listhandler': $output = '
'. t('The listhandler module allows you to connect mailing lists to forums and vice versa. It works in conjunction with the mailhandler module. Mailhandler receives an email and then asks listhandler if the received email is part of a list. If the email is from a mailing list associated with a forum on your site, then listhandler adds the recieved email to the forum.') .'
'; - $output .= '' .t('Listhandler administration allows you to set the email address of the list administrator. The email address is used as the From: field to check the address of messages sent by anonymous users. You can also enable and disable the listhandler for a list.') .'
'; + $output .= ''. t('Listhandler administration allows you to set the email address of the list administrator. The email address is used as the From: field to check the address of messages sent by anonymous users. You can also enable and disable the listhandler for a list.') .'
'; $output .= t('You can:
'. t('For more information please read the configuration and customization handbook Listhandler page.', array('%listhandler' => 'http://www.drupal.org/handbook/modules/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; case 'admin/modules#description': $output = t('Connect your mailing lists to your drupal site and your drupal site to your mailing lists.'); break; - case 'admin/listhandler': - $output = t("First go to the mailhandler configuration screen and add some mailboxes. A mailbox becomes recognised as a mailing list if the 'Second E-mail address' is set. This is not optional for mailing lists.", array('%url' => url('admin/mailhandler'))); + case 'admin/content/listhandler': + $output = t("First go to the mailhandler configuration screen and add some mailboxes. A mailbox becomes recognised as a mailing list if the 'Second E-mail address' is set. This is not optional for mailing lists.", array('!url' => url('admin/mailhandler'))); break; } return $output; @@ -37,8 +38,8 @@ function listhandler_menu($may_cache) { $items = array(); if ($may_cache) { - $items[] = array('path' => 'admin/listhandler', - 'title' => t('listhandler'), + $items[] = array('path' => 'admin/content/listhandler', + 'title' => t('Listhandler'), 'callback' => 'listhandler_admin', 'access' => user_access('administer listhandler')); } @@ -49,7 +50,7 @@ function listhandler_menu($may_cache) { /** * Configuration options for this module */ -function listhandler_admin_form() { +function listhandler_admin_form($form) { $form['listhandler_from'] = array( '#type' => 'textfield', '#title' => t('Admin address'), @@ -90,8 +91,9 @@ function listhandler_admin_form() { '#type' => 'submit', '#value' => t('Submit'), ); + return $form; - return drupal_get_form('listhandler_settings', $form); +//OLD return drupal_get_form('listhandler_settings', $form); } /** @@ -99,15 +101,15 @@ function listhandler_admin_form() { */ function theme_listhandler_settings($form) { - $output = form_render($form['listhandler_from']); - $output .= form_render($form['listhandler_strip_title']); - $output .= form_render($form['listhandler_accountstatus']); + $output = drupal_render($form['listhandler_from']); + $output .= drupal_render($form['listhandler_strip_title']); + $output .= drupal_render($form['listhandler_accountstatus']); if (count($form['listhandler_list'])) { $rows = array(); foreach(element_children($form['listhandler_list']) as $mid) { $row = array(); - $row[] = form_render($form['listhandler_list'][$mid]); - $row[] = form_render($form['listhandler_prefix'][$mid]); + $row[] = drupal_render($form['listhandler_list'][$mid]); + $row[] = drupal_render($form['listhandler_prefix'][$mid]); $rows[] = $row; } $header = array(t('mailing list'), t('prefix')); @@ -115,9 +117,9 @@ function theme_listhandler_settings($for $output .= '