added forgoten materio_translators.install file
This commit is contained in:
parent
e24eec56e7
commit
669341f1d6
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* file_description
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function materio_translator_schema() {
|
||||
$schema['materio_translator'] = array(
|
||||
'description' => 'Store language permissions per user',
|
||||
'fields' => array(
|
||||
'uid' => array(
|
||||
'description' => 'The primary identifier for a user.',
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
),
|
||||
'perm' => array(
|
||||
'description' => 'List of languages that the user has permission for.',
|
||||
'type' => 'text',
|
||||
'not null' => FALSE,
|
||||
'size' => 'big',
|
||||
),
|
||||
),
|
||||
'primary key' => array('uid'),
|
||||
);
|
||||
return $schema;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_install().
|
||||
*/
|
||||
function materio_translator_install() {
|
||||
// Set module weight for it to run after core and i18n modules
|
||||
db_query("UPDATE {system} SET weight = 90 WHERE name = 'materio_translator' AND type = 'module'");
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function materio_translator_uninstall() {
|
||||
variable_del('i18n_access_languages');
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user