Révision ca0757b9
Ajouté par Assos Assos il y a plus de 9 ans
drupal7/sites/all/modules/file_entity/file_entity.install | ||
---|---|---|
375 | 375 |
'permission' => 'view file', |
376 | 376 |
'module' => 'file_entity', |
377 | 377 |
)) |
378 |
->condition('rid', $rid) |
|
379 |
->condition('permission', 'view file') |
|
378 | 380 |
->execute(); |
379 | 381 |
} |
380 | 382 |
} |
... | ... | |
900 | 902 |
|
901 | 903 |
// Migrate any existing MIME type information into {file_type}. |
902 | 904 |
if (db_table_exists('file_type_mimetypes')) { |
903 |
foreach (file_type_load_all(TRUE) as $type) { |
|
904 |
$mimetypes = array(); |
|
905 |
$result = db_select('file_type_mimetypes', 'ftm') |
|
905 |
module_load_include('inc', 'file_entity', 'file_entity.file_api'); |
|
906 |
$types = file_type_load_all(TRUE); |
|
907 |
foreach ($types as $type) { |
|
908 |
$mimetypes = db_select('file_type_mimetypes', 'ftm') |
|
906 | 909 |
->fields('ftm', array('mimetype')) |
907 |
->condition('type', $type->type, '=') |
|
908 |
->execute(); |
|
909 |
|
|
910 |
foreach ($result as $record) { |
|
911 |
$mimetypes[] = $record->mimetype; |
|
912 |
} |
|
910 |
->condition('type', $type->type) |
|
911 |
->execute()->fetchCol(); |
|
913 | 912 |
|
914 | 913 |
if (!empty($mimetypes)) { |
915 | 914 |
$type->mimetypes = $mimetypes; |
Formats disponibles : Unified diff
Weekly update of contrib modules