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

Diff of /contributions/modules/send/send.install

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

revision 1.12, Mon May 25 20:25:56 2009 UTC revision 1.13, Fri Aug 7 01:00:03 2009 UTC
# Line 1  Line 1 
1  <?php // $Id: send.install,v 1.11 2009/05/22 15:21:55 vauxia Exp $  <?php // $Id: send.install,v 1.12 2009/05/25 20:25:56 vauxia Exp $
2    
3  function send_schema() {  function send_schema() {
4    $schema = array(    $schema = array(
# Line 198  function send_schema() { Line 198  function send_schema() {
198      ),      ),
199    );    );
200    
201      // TODO this doesn't work:  If send is disbled and then uninstalled, its
202      // own tables (and probably those other modules) are not returned.
203    foreach (module_invoke_all('send_mode_info') as $name => $info) {    foreach (module_invoke_all('send_mode_info') as $name => $info) {
204      if (isset($info['database columns'])) {      if (isset($info['database columns'])) {
205        $name = 'send_contact_'. $name;        $name = 'send_contact_'. $name;
# Line 227  function send_schema() { Line 229  function send_schema() {
229    
230  function send_install() {  function send_install() {
231    drupal_install_schema('send');    drupal_install_schema('send');
232    _send_install_set_default_template();  
233      // See http://drupal.org/node/200931 : after schema has been loaded,
234      // call _send_install_set_default_template, which uses drupal_write_record.
235      register_shutdown_function('drupal_get_schema', NULL, TRUE);
236      register_shutdown_function('_send_install_set_default_template');
237  }  }
238    
239  function send_uninstall() {  function send_uninstall() {
# Line 243  function _send_install_set_default_templ Line 249  function _send_install_set_default_templ
249      $template = (object) array(      $template = (object) array(
250        'name' => t('Default template'),        'name' => t('Default template'),
251        'status' => 1,        'status' => 1,
252        'subject' => t('Message from %site', array('%site' => variable_get('site_name', 'Drupal'))),        'subject' => t('Message from @site', array('@site' => variable_get('site_name', 'Drupal'))),
253        'body' => "%message\n%body",        'body' => "%message\n%body",
254        'format' => FILTER_FORMAT_DEFAULT,        'format' => FILTER_FORMAT_DEFAULT,
255        'settings' => array(),        'settings' => array(),

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.2