/[drupal]/contributions/modules/mail/mail.install
ViewVC logotype

Diff of /contributions/modules/mail/mail.install

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

revision 1.1, Mon Oct 16 17:04:46 2006 UTC revision 1.2, Mon Nov 26 18:08:53 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: $  // $Id: mail.install,v 1.1 2006/10/16 17:04:46 nedjo Exp $
3    
4  function mail_install() {  function mail_install() {
5    variable_set('mail_mail', 1);    variable_set('mail_mail', 1);
6      _mail_install_type_create();
7    }
8    
9    /**
10     * Implementation of hook_uninstall().
11     */
12    function book_uninstall() {
13      db_query("DELETE FROM {menu_links} WHERE module = 'mail'");
14      menu_cache_clear_all();
15      drupal_uninstall_schema('mail');
16    }
17    
18    function _mail_install_type_create() {
19      // Create an additional node type
20      $mail_node_type = array(
21        'type' => 'mail',
22        'name' => t('Mail'),
23        'module' => 'node',
24        'title_label' => t('Subject'),
25        'body_label' => t('Message'),
26        'description' => t('A <em>mail</em> posting is sent to registered users with specified roles and also saved to the site database for future reference.'),
27        'custom' => TRUE,
28        'modified' => TRUE,
29        'locked' => FALSE
30      );
31    
32      $mail_node_type = (object)_node_type_set_defaults($mail_node_type);
33      node_type_save($mail_node_type);
34      // Default to not promoted.
35      variable_set('node_options_mail', array('status'));
36      // Comments disabled
37      variable_set('comment_mail', '0');
38    }
39    
40    function mail_update_1() {
41      _book_install_type_create();
42  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.2