[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/modules/filter/ -> filter.install (source)

   1  <?php
   2  // $Id: filter.install,v 1.5.2.1 2009/01/06 15:46:36 goba Exp $
   3  
   4  /**
   5   * Implementation of hook_schema().
   6   */
   7  function filter_schema() {
   8    $schema['filters'] = array(
   9      'description' => 'Table that maps filters (HTML corrector) to input formats (Filtered HTML).',
  10      'fields' => array(
  11        'fid' => array(
  12          'type' => 'serial',
  13          'not null' => TRUE,
  14          'description' => 'Primary Key: Auto-incrementing filter ID.',
  15        ),
  16        'format' => array(
  17          'type' => 'int',
  18          'not null' => TRUE,
  19          'default' => 0,
  20          'description' => 'Foreign key: The {filter_formats}.format to which this filter is assigned.',
  21        ),
  22        'module' => array(
  23          'type' => 'varchar',
  24          'length' => 64,
  25          'not null' => TRUE,
  26          'default' => '',
  27          'description' => 'The origin module of the filter.',
  28        ),
  29        'delta' => array(
  30          'type' => 'int',
  31          'not null' => TRUE,
  32          'default' => 0,
  33          'size' => 'tiny',
  34          'description' => 'ID to identify which filter within module is being referenced.',
  35        ),
  36        'weight' => array(
  37          'type' => 'int',
  38          'not null' => TRUE,
  39          'default' => 0,
  40          'size' => 'tiny',
  41          'description' => 'Weight of filter within format.',
  42        )
  43      ),
  44      'primary key' => array('fid'),
  45      'unique keys' => array(
  46        'fmd' => array('format', 'module', 'delta'),
  47      ),
  48      'indexes' => array(
  49        'list' => array('format', 'weight', 'module', 'delta'),
  50      ),
  51    );
  52    $schema['filter_formats'] = array(
  53      'description' => 'Stores input formats: custom groupings of filters, such as Filtered HTML.',
  54      'fields' => array(
  55        'format' => array(
  56          'type' => 'serial',
  57          'not null' => TRUE,
  58          'description' => 'Primary Key: Unique ID for format.',
  59        ),
  60        'name' => array(
  61          'type' => 'varchar',
  62          'length' => 255,
  63          'not null' => TRUE,
  64          'default' => '',
  65          'description' => 'Name of the input format (Filtered HTML).',
  66        ),
  67        'roles' => array(
  68          'type' => 'varchar',
  69          'length' => 255,
  70          'not null' => TRUE,
  71          'default' => '',
  72          'description' => 'A comma-separated string of roles; references {role}.rid.', // This is bad since you can't use joins, nor index.
  73        ),
  74        'cache' => array(
  75          'type' => 'int',
  76          'not null' => TRUE,
  77          'default' => 0,
  78          'size' => 'tiny',
  79          'description' => 'Flag to indicate whether format is cachable. (1 = cachable, 0 = not cachable)',
  80        ),
  81      ),
  82      'primary key' => array('format'),
  83      'unique keys' => array('name' => array('name')),
  84    );
  85  
  86    $schema['cache_filter'] = drupal_get_schema_unprocessed('system', 'cache');
  87    $schema['cache_filter']['description'] = 'Cache table for the Filter module to store already filtered pieces of text, identified by input format and md5 hash of the text.';
  88  
  89    return $schema;
  90  }
  91  


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7