cctags.install in cctags 6
Same filename and directory in other branches
install/uninstall cctags variavles and scheme
File
cctags.installView source
<?php
/**
* @file
* install/uninstall cctags variavles and scheme
*/
function cctags_install() {
drupal_install_schema('cctags');
db_query("UPDATE {system} SET weight = 10 WHERE name = 'cctags'");
}
function cctags_uninstall() {
drupal_uninstall_schema('cctags');
db_query("DELETE FROM {variable} WHERE name LIKE 'cctags%'");
menu_rebuild();
_cctags_clear_cache(NULL, 'node', FALSE);
_cctags_clear_cache(NULL, 'all', TRUE);
}
function cctags_schema() {
$schema['cctags'] = array(
'fields' => array(
'cctid' => array(
'type' => 'serial',
'not null' => TRUE,
),
'name' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
),
'block' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'block_name' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
),
'page' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'page_title' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
),
'page_path' => array(
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
),
'page_level' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 6,
),
'page_amount' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'page_sort' => array(
'type' => 'varchar',
'length' => 16,
'not null' => TRUE,
'default' => 'title,asc',
),
'page_mode' => array(
'type' => 'varchar',
'length' => 16,
'not null' => TRUE,
'default' => 'mixed',
),
'page_vocname' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'item_data' => array(
'type' => 'text',
'not null' => TRUE,
),
),
'primary key' => array(
'cctid',
),
);
return $schema;
}
Functions
Name | Description |
---|---|
cctags_install | @file install/uninstall cctags variavles and scheme |
cctags_schema | |
cctags_uninstall |