Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/file_entity/file_entity.pages.inc | ||
---|---|---|
35 | 35 |
if (!is_file($file->uri)) { |
36 | 36 |
return MENU_NOT_FOUND; |
37 | 37 |
} |
38 |
// @todo Remove this once drupal_basename is fixed for PHP versions greater |
|
39 |
// than '5.3.29'. |
|
40 |
$basename_function = version_compare(PHP_VERSION,'5.3.29','>') ? 'basename' : 'drupal_basename'; |
|
38 |
// @todo Why basename? Why not drupal_basename which was working up until recently. |
|
41 | 39 |
$headers = array( |
42 | 40 |
'Content-Type' => mime_header_encode($file->filemime), |
43 |
'Content-Disposition' => 'attachment; filename="' . mime_header_encode($basename_function($file->uri)) . '"',
|
|
41 |
'Content-Disposition' => 'attachment; filename="' . mime_header_encode(basename($file->uri)) . '"',
|
|
44 | 42 |
'Content-Length' => $file->filesize, |
45 | 43 |
'Content-Transfer-Encoding' => 'binary', |
46 | 44 |
'Pragma' => 'no-cache', |
Formats disponibles : Unified diff
Weekly update of contrib modules