/[drupal]/contributions/modules/geo/modules/geo_field/geo_field.module
ViewVC logotype

Diff of /contributions/modules/geo/modules/geo_field/geo_field.module

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

revision 1.22, Thu Jun 18 01:24:11 2009 UTC revision 1.23, Fri Jun 26 03:55:51 2009 UTC
# Line 1  Line 1 
1  <?php // $Id: geo_field.module,v 1.21 2009/06/10 23:28:36 vauxia Exp $  <?php // $Id: geo_field.module,v 1.22 2009/06/18 01:24:11 vauxia Exp $
2    
3  /**  /**
4   * @file   * @file
# Line 38  function geo_field_settings($op, $field) Line 38  function geo_field_settings($op, $field)
38        );        );
39    
40        // TODO pick the SRID for this column        // TODO pick the SRID for this column
41        if (!isset($field['srid'])) $field['srid'] = GEO_SRID_DEFAULT;        if (!$field['srid']) $field['srid'] = GEO_SRID_DEFAULT;
42        $form['srid'] = array('#type' => 'value', '#value' => $field['srid']);        $form['srid'] = array('#type' => 'value', '#value' => $field['srid']);
43    
44        return $form;        return $form;
# Line 141  function geo_field($op, &$node, $field, Line 141  function geo_field($op, &$node, $field,
141          // Convert the wkt to binary data before the insert. This allows the          // Convert the wkt to binary data before the insert. This allows the
142          // input to pass through the binary query substitutions.          // input to pass through the binary query substitutions.
143          if(!geo_content_is_empty($item, $field)) {          if(!geo_content_is_empty($item, $field)) {
144            $item['geo'] = db_result(db_query("SELECT GeomFromText('%s', %d)", $item['geo'], $item['srid']));            $item['geo'] = db_result(db_query("SELECT GeomFromText('%s', %d)", $item['geo'], $field['srid']));
145          }          }
146          $items[$k] = $item;          $items[$k] = $item;
147        }        }

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.2