You are here

livechat.install in LiveChat 7

Same filename and directory in other branches
  1. 8.3 livechat.install
  2. 8 livechat.install
  3. 8.2 livechat.install

Installation file for the LiveChat module.

File

livechat.install
View source
<?php

/**
 * @file
 * Installation file for the LiveChat module.
 */

/**
 * Implements hook_requirements().
 */
function livechat_requirements($phase) {
  $requirements = array();
  $t = get_t();
  if ($phase == 'runtime') {

    // Raise warning if a LiveChat license has not been installed yet.
    if (!livechat_is_installed()) {
      $requirements['livechat'] = array(
        'title' => $t('LiveChat'),
        'description' => $t('A LiveChat license has not been installed. Please go to <a href="@url">LiveChat settings</a>.', array(
          '@url' => url('admin/config/services/livechat/install'),
        )),
        'severity' => REQUIREMENT_ERROR,
        'value' => $t('Not configured'),
      );
    }
  }
  return $requirements;
}

/**
 * Implements hook_uninstall().
 */
function livechat_uninstall() {
  variable_del('livechat_license');
  variable_del('livechat_visibility');
  variable_del('livechat_pages');
  variable_del('livechat_exclude_system_paths');
}

Functions