Projet

Général

Profil

Révision a1cafe7e

Ajouté par Assos Assos il y a plus de 4 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/field_collection/field_collection.migrate.inc
83 83
  /**
84 84
   * Import a single field collection item.
85 85
   *
86
   * @param $collection
86
   * @param \stdClass $collection
87 87
   *   Collection object to build. Pre-filled with any fields mapped in the
88 88
   *   migration.
89
   * @param $row
89
   * @param \stdClass $row
90 90
   *   Raw source data object - passed through to prepare/complete handlers.
91 91
   *
92 92
   * @return array|bool
......
139 139
        if ('field_' != substr($field, 0, 6)) {
140 140
          continue;
141 141
        }
142
        elseif (property_exists($entity_old, $field) && !property_exists($collection, $field)) {
142

  
143
        if (property_exists($entity_old, $field) && !property_exists($collection, $field)) {
143 144
          $entity->$field = $entity_old->$field;
144 145
        }
145 146
      }
......
149 150
    $status = entity_save('field_collection_item', $entity);
150 151
    migrate_instrument_stop('field_collection_save');
151 152

  
152
    if (in_array($this->hostEntityType, array('node', 'field_collection_item')) || ($status !== FALSE)) {
153
    if ($status !== FALSE || in_array($this->hostEntityType, array('node', 'field_collection_item'))) {
153 154
      $this->complete($entity, $row);
154 155
      if ($updating) {
155 156
        $this->numUpdated++;
......
159 160
      }
160 161
      return array($entity->item_id);
161 162
    }
162
    else {
163
      return FALSE;
164
    }
163

  
164
    return FALSE;
165 165
  }
166 166

  
167 167
  /**

Formats disponibles : Unified diff