You are here

views_bookmarkactivity.install in Activity 5.3

Same filename and directory in other branches
  1. 5.4 contrib/views_bookmarkactivity/views_bookmarkactivity.install

File

contrib/views_bookmarkactivity/views_bookmarkactivity.install
View source
<?php

/**
 * Implementation of hook_uninstall().
 */
function views_bookmarkactivity_uninstall() {

  // Remove any activity entries from the views_bookmarkactivity module
  if (module_exists('activityhistory')) {
    db_query("DELETE FROM {activity_history} WHERE aid IN (SELECT aid FROM {activity} WHERE module = '%s')", 'views_bookmarkactivity');
  }
  db_query("DELETE FROM {activity_targets} WHERE aid IN (SELECT aid FROM {activity} WHERE module = '%s')", 'views_bookmarkactivity');
  db_query("DELETE FROM {activity} WHERE module = '%s'", 'views_bookmarkactivity');

  // Delete any variables that have been set.
  // We don't just DELETE FROM {variable}, even though we could.
  $result = db_query("SELECT name FROM {variable} WHERE name LIKE 'views_bookmarkactivity_%'");

  // Instead we use the API, because API's can change!
  while ($row = db_fetch_object($result)) {
    variable_del($row->name);
  }
}

Functions

Namesort descending Description
views_bookmarkactivity_uninstall Implementation of hook_uninstall().