/[drupal]/contributions/modules/votesmart/modules/votesmart_field/votesmart_field.module
ViewVC logotype

Diff of /contributions/modules/votesmart/modules/votesmart_field/votesmart_field.module

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

revision 1.3, Sun Aug 17 15:36:33 2008 UTC revision 1.4, Tue Sep 9 01:11:46 2008 UTC
# Line 1  Line 1 
1  <?php // $Id: votesmart_field.module,v 1.2 2008/08/10 01:42:52 vauxia Exp $  <?php // $Id: votesmart_field.module,v 1.3 2008/08/17 15:36:33 vauxia Exp $
2    
3  /**  /**
4   * Implementation of hook_elements().   * Implementation of hook_elements().
# Line 79  function votesmart_field_field($op, &$no Line 79  function votesmart_field_field($op, &$no
79        if ($map = $field['votesmart_map'][$node->type]) {        if ($map = $field['votesmart_map'][$node->type]) {
80          foreach ($items as $item) {          foreach ($items as $item) {
81            if (votesmart_field_content_is_empty($item, $field)) continue;            if (votesmart_field_content_is_empty($item, $field)) continue;
82            $data = votesmart_get_record($field['votesmart_table'], $item);            $data = votesmart_get_record($item['table'], $item['id']);
83            foreach ($map as $field_name => $token) {            foreach ($map as $field_name => $token) {
84              _votesmart_field_map_data($node, $field_name, $token, $data);              _votesmart_field_map_data($node, $field_name, $token, $data);
85            }            }
# Line 123  function votesmart_field_widget(&$form, Line 123  function votesmart_field_widget(&$form,
123    );    );
124  //TODO temporary  //TODO temporary
125    $element = array(    $element = array(
     '#type' => 'textfield',  
     '#input' => TRUE,  
126      '#columns' => array('id', 'table'),      '#columns' => array('id', 'table'),
127        'id' => array(
128          '#type' => 'textfield',
129          '#default_value' => $items[$delta]['id'],
130          '#input' => TRUE,
131        ),
132        'table' => array(
133          '#type' => 'value',
134          '#value' => $field['votesmart_table'],
135        ),
136    );    );
137    return $element;    return $element;
138  }  }

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

  ViewVC Help
Powered by ViewVC 1.1.2