You are here

function user_relationship_node_access_install in User Relationships 5.2

Same name and namespace in other branches
  1. 5.3 user_relationship_node_access/user_relationship_node_access.install \user_relationship_node_access_install()
  2. 6 user_relationship_node_access/user_relationship_node_access.install \user_relationship_node_access_install()

Install

File

plugins/user_relationship_node_access/user_relationship_node_access.install, line 8

Code

function user_relationship_node_access_install() {
  $success = _user_relationships_installation_query(array(
    "CREATE TABLE {user_relationship_node_access} (\n      `nid` int(10) unsigned NOT NULL default 0,\n      `permissions` text NOT NULL,\n      PRIMARY KEY (nid)\n    ) /*!40100 DEFAULT CHARACTER SET utf8*/  ",
  ), array(
    "CREATE TABLE {user_relationship_node_access} (\n      nid int_unsigned NOT NULL default 0,\n      permissions text NOT NULL,\n      PRIMARY KEY (nid)\n    )",
  ));
  if ($success) {
    drupal_set_message(t('User Relationship Private Nodes module installed successfully.'));
  }
  else {
    drupal_set_message(t('The installation of the User Relationship Private Nodes module as unsuccessful.'), 'error');
  }
}