You are here

function kaltura_uninstall in Kaltura 6

Same name and namespace in other branches
  1. 5 kaltura.install \kaltura_uninstall()
  2. 6.2 kaltura.install \kaltura_uninstall()
  3. 7.3 kaltura.install \kaltura_uninstall()
  4. 7.2 kaltura.install \kaltura_uninstall()

Implementation of hook_uninstall().

File

./kaltura.install, line 204

Code

function kaltura_uninstall() {

  // Remove tables.
  global $_kaltura_client_folder;
  require_once $_kaltura_client_folder . 'kaltura_settings.php';
  drupal_uninstall_schema('kaltura');
  drupal_set_message('Kaltura module was uninstalled.');

  // get all kaltura_ variables, and delete theme
  $get_vars = 'SELECT name FROM {variable} WHERE name LIKE \'%s\'';
  $result = db_query($get_vars, 'kaltura\\_%');
  $vars_deleted = '';
  while ($var = db_fetch_object($result)) {
    variable_del($var->name);
    $vars_deleted .= $var->name . ',';
  }
  watchdog('kaltura', 'the following vars were deleted during uninstall: ' . rtrim($vars_deleted, ','));
}