/[drupal]/contributions/modules/computed_field/computed_field.module
ViewVC logotype

Diff of /contributions/modules/computed_field/computed_field.module

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

revision 1.17.2.4, Fri Oct 17 21:21:05 2008 UTC revision 1.17.2.5, Mon May 18 23:49:00 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: computed_field.module,v 1.17.2.3 2008/09/29 04:08:21 moonshine Exp $  // $Id: computed_field.module,v 1.17.2.4 2008/10/17 21:21:05 moonshine Exp $
3    
4  /**  /**
5   * Implementation of cck hook_field_info()   * Implementation of cck hook_field_info()
# Line 95  function computed_field_field_settings($ Line 95  function computed_field_field_settings($
95      case 'database columns':      case 'database columns':
96        if ($field['store']) {        if ($field['store']) {
97          $columns = array('value' => array());          $columns = array('value' => array());
98          $columns['value']['type'] = isset($field['data_type']) ? $field['data_type'] : 'varchar';          if ($field['data_type'] == 'longtext') {
99              $columns['value']['type'] = 'text';
100              $columns['value']['size'] = 'big';
101            }
102            else {
103              $columns['value']['type'] = isset($field['data_type']) ? $field['data_type'] : 'varchar';
104            }
105          // text and longtext should not have a length, so we ignore it          // text and longtext should not have a length, so we ignore it
106          if (!($field['data_type'] == 'text' || $field['data_type'] == 'longtext')) {          if (!($field['data_type'] == 'text' || $field['data_type'] == 'longtext')) {
107            $columns['value']['length'] = isset($field['data_length']) ? $field['data_length'] : 32;            $columns['value']['length'] = isset($field['data_length']) ? $field['data_length'] : 32;

Legend:
Removed from v.1.17.2.4  
changed lines
  Added in v.1.17.2.5

  ViewVC Help
Powered by ViewVC 1.1.2