You are here

vkxp.install in VK CrossPoster 6.2

Same filename and directory in other branches
  1. 6.3 vkxp.install
  2. 6 vkxp.install
  3. 7.2 vkxp.install
  4. 7 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.
 */

/**
 * Implementation of 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;
}

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

Functions

Namesort descending Description
vkxp_requirements Implementation of hook_requirements().
vkxp_uninstall Implementation of hook_uninstall().