/[drupal]/contributions/modules/cck/content.module
ViewVC logotype

Diff of /contributions/modules/cck/content.module

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

revision 1.301.2.106.2.13, Sun Aug 30 14:21:01 2009 UTC revision 1.301.2.106.2.14, Tue Nov 3 19:41:18 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: content.module,v 1.301.2.106.2.12 2009/08/17 12:13:24 markuspetrux Exp $  // $Id: content.module,v 1.301.2.106.2.13 2009/08/30 14:21:01 markuspetrux Exp $
3  /**  /**
4   * @file   * @file
5   * Allows administrators to associate custom fields to content types.   * Allows administrators to associate custom fields to content types.
# Line 1035  function content_storage($op, $node) { Line 1035  function content_storage($op, $node) {
1035    
1036              // Preserve deltas when loading items from database.              // Preserve deltas when loading items from database.
1037              if (isset($row['delta'])) {              if (isset($row['delta'])) {
1038                  // Make sure multiple value fields have consecutive deltas.
1039                  if ($row['delta'] > 0 && !isset($additions[$field_name][$row['delta']-1])) {
1040                    $empty = array();
1041                    foreach (array_keys($db_info['columns']) as $column) {
1042                      $empty[$column] = NULL;
1043                    }
1044                    for ($delta = max(array_keys($additions[$field_name])) + 1; $delta < $row['delta']; $delta++) {
1045                      $additions[$field_name][$delta] = $empty;
1046                    }
1047                  }
1048                $additions[$field_name][$row['delta']] = $item;                $additions[$field_name][$row['delta']] = $item;
1049              }              }
1050              else {              else {

Legend:
Removed from v.1.301.2.106.2.13  
changed lines
  Added in v.1.301.2.106.2.14

  ViewVC Help
Powered by ViewVC 1.1.2