private.install in Private 7.2
Same filename and directory in other branches
Install, update and uninstall functions for the private module.
File
private.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the private module.
*/
/**
* Implements hook_schema().
*/
function private_schema() {
$schema['private'] = array(
'fields' => array(
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'private' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'nid',
),
);
return $schema;
}
/**
* Implements hook_update_N().
*
* Force grants rebuild because they may have become wrong due to bugs in prior versions.
*/
function private_update_7100() {
node_access_needs_rebuild(TRUE);
}
/**
* Implements hook_disable().
*/
function private_disable() {
// Technique copied from nodeaccess_disable.
private_disabling(TRUE);
}
/**
* Implements hook_uninstall().
*/
function private_uninstall() {
// Remove variables.
$node_types = array_keys(node_type_get_types());
foreach ($node_types as $node_type) {
variable_del('private_' . $node_type);
}
}
Functions
Name | Description |
---|---|
private_disable | Implements hook_disable(). |
private_schema | Implements hook_schema(). |
private_uninstall | Implements hook_uninstall(). |
private_update_7100 | Implements hook_update_N(). |