You are here

campaignmonitor.install in Campaign Monitor 6.3

File

campaignmonitor.install
View source
<?php

/*
 * @file
 * Handles the installtion, uninstall and update functions for the module.
 */
function campaignmonitor_uninstall() {
  variable_del('campaignmonitor_userpagedisplaytext');
  variable_del('campaignmonitor_checkboxdisplaytext');
  variable_del('campaignmonitor_client_id');
  variable_del('campaignmonitor_lists');
  variable_del('campaignmonitor_display_on');
  variable_del('campaignmonitor_api_key');
  variable_del('campaignmonitor_pastcampaignurl');
  variable_del('campaignmonitor_connection_timeout');
}

/**
 * Updates from one list to multiple
 */
function campaignmonitor_update_6200() {
  $ret = array();
  $list_id = variable_get('campaignmonitor_list_id', FALSE);
  if ($list_id) {
    $ret[] = array(
      'success' => TRUE,
      'query' => 'You have now updated to multi list format, please make sure you go to the admin page to update your list details.',
    );
  }
  variable_del('campaignmonitor_list_id');
  return $ret;
}

/**
 * Removes double serialization of lists in the database.
 */
function campaignmonitor_update_6300() {
  $lists = variable_get('campaignmonitor_lists', array());
  if (!empty($lists) && !is_array($lists)) {
    $lists = unserialize($lists);
    variable_set('campaignmonitor_lists', $lists);
  }
}

Functions

Namesort descending Description
campaignmonitor_uninstall
campaignmonitor_update_6200 Updates from one list to multiple
campaignmonitor_update_6300 Removes double serialization of lists in the database.