Révision 02a0babc
Ajouté par Assos Assos il y a presque 7 ans
drupal7/sites/all/modules/media/media.module | ||
---|---|---|
1138 | 1138 |
function media_file_validate_types($file, $types) { |
1139 | 1139 |
$errors = array(); |
1140 | 1140 |
|
1141 |
if (!function_exists('file_entity_get_filetype_candidates')) { |
|
1142 |
module_load_include('inc', 'file_entity', 'file_entity.pages'); |
|
1143 |
} |
|
1141 | 1144 |
$file_candidates = array_keys(file_entity_get_filetype_candidates($file)); |
1142 | 1145 |
if (!array_intersect($file_candidates, $types)) { |
1143 | 1146 |
$errors[] = t('Only the following types of files are allowed to be uploaded: %types-allowed', array('%types-allowed' => implode(', ', $types))); |
... | ... | |
1217 | 1220 |
|
1218 | 1221 |
// Filter out everything except a whitelist of known safe options. |
1219 | 1222 |
$safe_options = array( |
1220 |
'activePlugins',
|
|
1223 |
'enabledPlugins',
|
|
1221 | 1224 |
'fid', |
1222 | 1225 |
'id', |
1223 | 1226 |
'multiselect', |
Formats disponibles : Unified diff
Weekly update of contrib modules