Ignore:
Timestamp:
Oct 16, 2012, 10:35:07 AM (12 years ago)
Author:
mistic100
Message:

correct upgrade procedure

Location:
extensions/ContactForm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/ContactForm/admin/emails.php

    r18331 r18649  
    2727  }
    2828 
    29   pwg_query('TRUNCATE TABLE `'. CONTACT_FORM_TABLE. '`');
     29  pwg_query('TRUNCATE TABLE `'. CONTACT_FORM_TABLE. '`;');
    3030 
    3131  mass_inserts(
  • extensions/ContactForm/include/install.inc.php

    r18331 r18649  
    3030      'cf_mandatory_mail' => true,
    3131      'cf_mandatory_name' => true,
    32       'cf_redirect_delay' => 5,
    3332      'cf_mail_type' => 'text/html',
    3433      'cf_redirect_url' => null,
     
    5756     
    5857      // move emails to database
    59       $email = array();
     58      $emails = array();
    6059      foreach ($new_conf['cf_admin_mails'] as $email => $data)
    6160      {
     
    8281      // save config
    8382      $conf['ContactForm'] = serialize($new_conf);
    84       $conf['ContactForm_before'] = stripslashes($conf['persoformtop']);
    85       $conf['ContactForm_after'] = stripslashes($conf['persoformbottom']);
     83      $conf['ContactForm_before'] = stripslashes(@$conf['persoformtop']);
     84      $conf['ContactForm_after'] = stripslashes(@$conf['persoformbottom']);
    8685     
    8786      conf_update_param('ContactForm', $conf['ContactForm']);
  • extensions/ContactForm/main.inc.php

    r18315 r18649  
    4545 
    4646  if (
     47    CONTACT_FORM_VERSION == 'auto' or
    4748    $pwg_loaded_plugins[CONTACT_FORM_ID]['version'] == 'auto' or
    4849    version_compare($pwg_loaded_plugins[CONTACT_FORM_ID]['version'], CONTACT_FORM_VERSION, '<')
     
    5253    contact_form_install();
    5354   
    54     if ($pwg_loaded_plugins[CONTACT_FORM_ID]['version'] != 'auto')
     55    if ( $pwg_loaded_plugins[CONTACT_FORM_ID]['version'] != 'auto' and CONTACT_FORM_VERSION != 'auto' )
    5556    {
    5657      $query = '
  • extensions/ContactForm/maintain.inc.php

    r17945 r18649  
    2121function plugin_uninstall()
    2222{
     23  global $prefixeTable;
     24 
    2325  pwg_query('DELETE FROM `'. CONFIG_TABLE .'` WHERE param LIKE "ContactForm%" LIMIT 3;');
     26  pwg_query('DROP TABLE IF EXISTS `'. $prefixeTable .'contact_form`;');
    2427}
    2528
Note: See TracChangeset for help on using the changeset viewer.