/[drupal]/contributions/modules/views_calc/views_calc.install
ViewVC logotype

Diff of /contributions/modules/views_calc/views_calc.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3, Tue Sep 16 18:03:08 2008 UTC revision 1.4, Fri Jun 12 13:23:33 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: views_calc.install,v 1.2 2008/09/15 18:11:11 karens Exp $  // $Id: views_calc.install,v 1.3 2008/09/16 18:03:08 karens Exp $
3  /**  /**
4   * Implementation of hook_schema().   * Implementation of hook_schema().
5   */   */
# Line 10  function views_calc_schema() { Line 10  function views_calc_schema() {
10        'label' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''),        'label' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''),
11        'format' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''),        'format' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''),
12        'custom' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''),        'custom' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''),
13          'base' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''),
14        'tablelist' => array('type' => 'text', 'not null' => TRUE),        'tablelist' => array('type' => 'text', 'not null' => TRUE),
15        'fieldlist' => array('type' => 'text', 'not null' => TRUE),        'fieldlist' => array('type' => 'text', 'not null' => TRUE),
16        'calc' => array('type' => 'text', 'not null' => TRUE),        'calc' => array('type' => 'text', 'not null' => TRUE),
# Line 125  function views_calc_update_2() { Line 126  function views_calc_update_2() {
126    return $ret;    return $ret;
127  }  }
128    
 /**  
  * TODO  
  * Use these values to create new default views, then delete them.  
  *  
129  function views_calc_update_6000() {  function views_calc_update_6000() {
   $view_calcs = (array) variable_get('views_calc_vid','');  
   foreach ($view_calcs as $view_id) {  
     variable_del('views_calc_'. $view_id .'_col');  
     variable_del('views_calc_'. $view_id .'_col_calc');  
     variable_del('views_calc_'. $view_id .'_row');  
     variable_del('views_calc_'. $view_id .'_row_calc');  
   }  
   variable_del('views_calc_vid');  
   variable_del('views_calc_operators');  
   
 }  
  */  
130      $ret = array();
131      db_add_field($ret, 'views_calc_fields', 'base', array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => 'node'));
132      return $ret;
133    }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.2