You are here

function exclude_node_title_install in Exclude Node Title 7

Same name and namespace in other branches
  1. 8 exclude_node_title.install \exclude_node_title_install()
  2. 6 exclude_node_title.install \exclude_node_title_install()

Implements hook_install().

File

./exclude_node_title.install, line 11
Exclude Node Title module install/schema hooks.

Code

function exclude_node_title_install() {

  // Insert in the database the permission to use exclude node title.
  $role_ids = db_query("SELECT rid FROM {role}");
  foreach ($role_ids as $role) {
    db_query("INSERT INTO {role_permission} (rid, permission, module)\n        VALUES (:rid, 'use exclude node title', 'exclude_node_title')", array(
      ':rid' => $role->rid,
    ));
  }
}