| 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 |
*/ |
*/ |
| 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), |
| 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 |
|
} |