FINAL suepr merge step : added all modules to this super repos
This commit is contained in:
61
sites/all/modules/contrib/mail/smtp/smtp.install
Normal file
61
sites/all/modules/contrib/mail/smtp/smtp.install
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* The installation instructions for the SMTP Authentication Support.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_install().
|
||||
*/
|
||||
function smtp_install() {
|
||||
variable_set('smtp_on', 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function smtp_uninstall() {
|
||||
variable_del('smtp_from');
|
||||
variable_del('smtp_fromname');
|
||||
variable_del('smtp_host');
|
||||
variable_del('smtp_hostbackup');
|
||||
variable_del('smtp_on');
|
||||
variable_del('smtp_password');
|
||||
variable_del('smtp_port');
|
||||
variable_del('smtp_protocol');
|
||||
variable_del('smtp_test_address');
|
||||
variable_del('smtp_username');
|
||||
|
||||
if (variable_get('smtp_library', '') == drupal_get_path('module', 'smtp') . '/smtp.module') {
|
||||
variable_del('smtp_library');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_enable().
|
||||
*/
|
||||
function smtp_enable() {
|
||||
$mail_modes = variable_get('mail_system', array('default-system' => 'DefaultMailSystem'));
|
||||
$mail_modes['default-system'] = 'SmtpMailSystem';
|
||||
variable_set('mail_system', $mail_modes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_disable().
|
||||
*/
|
||||
function smtp_disable() {
|
||||
$mail_modes = variable_get('mail_system');
|
||||
$mail_modes['default-system'] = 'DefaultMailSystem';
|
||||
variable_set('mail_system', $mail_modes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_update_N().
|
||||
* Upgrade to Drupal 7.x
|
||||
*/
|
||||
function smtp_update_7000() {
|
||||
if (variable_get('smtp_on', 0) != 0) {
|
||||
variable_set('mail_system', array('default-system' => 'SmtpMailSystem'));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user