You are here

vkxp.install in VK CrossPoster 7

Same filename and directory in other branches
  1. 6.3 vkxp.install
  2. 6 vkxp.install
  3. 6.2 vkxp.install
  4. 7.2 vkxp.install

Requirements and uninstall functions for the vkxp module.

File

vkxp.install
View source
<?php

/**
 * @file
 * Requirements and uninstall functions for the vkxp module.
 */

/**
 * Implements hook_requirements().
 */
function vkxp_requirements($phase) {
  $requirements = array();

  // Ensure translations don't break at install time.
  $t = get_t();
  if ($phase == 'runtime') {

    // Check for presence of curl support.
    if (!function_exists('curl_init')) {
      $requirements['vkxp_curl'] = array(
        'title' => $t('cURL Support for VKontakte CrossPoster'),
        'value' => $t('VKontakte CrossPoster requires <a href="http://php.net/manual/en/book.curl.php">cURL support in PHP</a> to function fully.  Without this, contents will not be posted to vkontakte.'),
        'severity' => REQUIREMENT_ERROR,
      );
    }
    else {
      $requirements['vkxp_curl'] = array(
        'title' => $t('cURL Support for VKontakte CrossPoster'),
        'value' => $t('cURL enabled'),
        'severity' => REQUIREMENT_OK,
      );
    }
  }
  return $requirements;
}

/**
 * Implements hook_uninstall().
 */
function vkxp_uninstall() {
  db_query("DELETE FROM {variable} WHERE name LIKE 'vkxp_%'");
  cache_clear_all('variables', 'cache_bootstrap');
}

Functions

Namesort descending Description
vkxp_requirements Implements hook_requirements().
vkxp_uninstall Implements hook_uninstall().