Projet

Général

Profil

Révision 66c11afc

Ajouté par Assos Assos il y a presque 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/file_entity/file_entity.file.inc
116 116
      _file_entity_update_image_field_dimensions($file);
117 117
    }
118 118

  
119
    // Flush image style derivatives whenever an image is updated.
120
    image_path_flush($file->uri);
119
    // Flush image style derivatives whenever an image is replaced.
120
    if (empty($file->file_entity_skip_image_flush) && file_entity_has_file_changed($file)) {
121
      image_path_flush($file->uri);
122
    }
121 123
  }
122 124

  
123 125
  // Clear any related field caches.
124 126
  file_entity_invalidate_field_caches($file);
125 127
}
126 128

  
129
/**
130
 * Returns whether the file has changed
131
 */
132
function file_entity_has_file_changed($file) {
133
  return empty($file->is_new) || empty($file->original) || $file->filesize != $file->original->filesize || $file->uri != $file->original->uri;
134
}
135

  
136

  
127 137
/**
128 138
 * Implements hook_file_delete().
129 139
 */

Formats disponibles : Unified diff