123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- <?php
- function skinr_schema() {
- $schema['skinr_skins'] = array(
- 'description' => 'Stores skinr data.',
- 'fields' => array(
- 'sid' => array(
- 'description' => 'The primary identifier for a skin configuration.',
- 'type' => 'serial',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- ),
- 'theme' => array(
- 'description' => 'The theme this configuration applies to.',
- 'type' => 'varchar',
- 'length' => 64,
- 'not null' => TRUE,
- 'default' => '',
- ),
- 'module' => array(
- 'description' => 'The module this configuration applies to.',
- 'type' => 'varchar',
- 'length' => 64,
- 'not null' => TRUE,
- 'default' => '',
- ),
- 'element' => array(
- 'description' => 'The element this configutation applies to.',
- 'type' => 'varchar',
- 'length' => 128,
- 'not null' => TRUE,
- 'default' => '',
- ),
- 'skin' => array(
- 'description' => 'The skin that has been applied.',
- 'type' => 'varchar',
- 'length' => 64,
- 'not null' => TRUE,
- 'default' => '',
- ),
- 'options' => array(
- 'description' => 'A serialized array containing the skin options that have been applied.',
- 'type' => 'text',
- 'size' => 'big',
- 'not null' => TRUE,
- 'serialize' => TRUE,
- ),
- 'status' => array(
- 'description' => 'Boolean indicating whether or not this item is enabled.',
- 'type' => 'int',
- 'not null' => TRUE,
- 'default' => 0,
- 'size' => 'tiny',
- ),
- ),
- 'primary key' => array('sid'),
- 'unique keys' => array(
- 'theme_module_element_skin' => array('theme', 'module', 'element', 'skin'),
- ),
- 'indexes' => array(
- 'theme' => array('theme'),
- 'module' => array('theme', 'module'),
- 'element' => array('theme', 'module', 'element'),
- 'skin' => array('skin'),
- ),
- );
- $schema['skinr_rules'] = array(
- 'description' => 'Stores skinr rule data.',
- 'fields' => array(
- 'rid' => array(
- 'type' => 'serial',
- 'not null' => TRUE,
- 'description' => 'Primary Key: Unique skinr rule ID.',
- ),
- 'title' => array(
- 'description' => 'The administrative title for this rule.',
- 'type' => 'varchar',
- 'length' => 128,
- 'not null' => TRUE,
- 'default' => '',
- ),
- 'rule_type' => array(
- 'description' => 'The content type of this rule.',
- 'type' => 'varchar',
- 'length' => 128,
- 'not null' => TRUE,
- 'default' => '',
- ),
- 'node_types' => array(
- 'type' => 'text',
- 'size' => 'normal',
- 'not null' => FALSE,
- 'serialize' => TRUE,
- 'description' => 'A serialized array of node types for this record.',
- ),
- 'roles' => array(
- 'type' => 'text',
- 'size' => 'normal',
- 'not null' => FALSE,
- 'serialize' => TRUE,
- 'description' => 'A serialized array of roles for this record.',
- ),
- 'visibility' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- 'default' => 0,
- 'size' => 'tiny',
- 'description' => 'Flag to indicate how to show rules on pages. (0 = Show on all pages except listed pages, 1 = Show only on listed pages, 2 = Use custom PHP code to determine visibility)',
- ),
- 'pages' => array(
- 'type' => 'text',
- 'not null' => TRUE,
- 'description' => 'Contains either a list of paths on which to include/exclude the rule or PHP code, depending on "visibility" setting.',
- ),
- ),
- 'primary key' => array('rid'),
- );
- return $schema;
- }
- function skinr_uninstall() {
-
- db_delete('variable')
- ->condition('name', 'skinr_%', 'LIKE')
- ->execute();
- }
- function skinr_update_last_removed() {
-
-
- return 6004;
- }
- function skinr_update_7001() {
- }
- function skinr_update_7002() {
-
- if (!db_field_exists('skinr_rules', 'rule_type')) {
- db_add_field('skinr_rules', 'rule_type', array(
- 'description' => 'The content type of this rule.',
- 'type' => 'varchar',
- 'length' => 128,
- 'not null' => TRUE,
- 'default' => '',
- ));
- db_update('skinr_rules')
- ->fields(array('rule_type' => 'page'))
- ->execute();
- db_update('skinr')
- ->fields(array('module' => 'rules'))
- ->condition('module', 'page')
- ->execute();
- }
- }
- function skinr_update_7003() {
- }
|