You are here

search_restrict.install in Search Restrict 7

Install, update and uninstall functions for the Search Restrict module.

File

search_restrict.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the Search Restrict module.
 */

/** 
 * Implements hook_install(). 
 */
function search_restrict_install() {

  // Set a low weight so the module is called before node module.
  db_query("UPDATE {system} SET weight = -10 WHERE name = 'search_restrict'");
}

/**
 * Implements hook_uninstall().
 */
function search_restrict_uninstall() {
  variable_del('search_restrict_content_type');
}

/**
* Remove extra variables set by the content type form.
*/
function search_restrict_update_6001() {
  $ret = array();
  $ret[] = update_sql("DELETE FROM {variable} WHERE NAME LIKE 'search_restrict_roles_%'");
  return $ret;
}

Functions

Namesort descending Description
search_restrict_install Implements hook_install().
search_restrict_uninstall Implements hook_uninstall().
search_restrict_update_6001 Remove extra variables set by the content type form.