Browse Source

Merge branch '7.x' of https://github.com/Islandora/islandora into 7.x

pull/253/head
phil 12 years ago
parent
commit
9eb5507896
  1. 0
      LICENSE.txt
  2. 0
      README.txt
  3. BIN
      images/Crystal_Clear_action_filenew.png
  4. 6
      includes/datastream.inc
  5. 0
      tests/README.txt
  6. 6
      tests/islandora_web_test_case.inc

0
LICENSE → LICENSE.txt

0
README → README.txt

BIN
images/Crystal_Clear_action_filenew.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

6
includes/datastream.inc

@ -37,7 +37,11 @@ function islandora_view_datastream(FedoraDatastream $datastream, $download = FAL
header('Content-length: ' . $datastream->size);
}
if ($download) {
header("Content-Disposition: attachment; filename=\"{$datastream->label}\"");
// Browsers will not append all extensions.
$mime_detect = new MimeDetect();
$extension = $mime_detect->getExtension($datastream->mimetype);
$filename = $datastream->label . '.' . $extension;
header("Content-Disposition: attachment; filename=\"$filename\"");
}
drupal_page_is_cacheable(FALSE);
// Try not to load the file into PHP memory!

0
tests/README → tests/README.txt

6
tests/islandora_web_test_case.inc

@ -54,8 +54,8 @@ class IslandoraWebTestCase extends DrupalWebTestCase {
* Stores the content of the Drupal Filter for later restoration.
*/
protected function backUpDrupalFilter() {
if (file_exists($this->configuration['filter_drupal_file'])) {
$this->originalDrupalFilterContent = file_get_contents($this->configuration['filter_drupal_file']);
if (file_exists($this->configuration['drupal_filter_file'])) {
$this->originalDrupalFilterContent = file_get_contents($this->configuration['drupal_filter_file']);
}
else {
throw new Exception('Failed to find the required Drupal Filter configuration file.');
@ -98,7 +98,7 @@ class IslandoraWebTestCase extends DrupalWebTestCase {
* Stores the content of the Drupal Filter for later restoration.
*/
protected function restoreDrupalFilter() {
$file = $this->configuration['filter_drupal_file'];
$file = $this->configuration['drupal_filter_file'];
if (isset($this->originalDrupalFilterContent)) {
file_put_contents($file, $this->originalDrupalFilterContent);
}

Loading…
Cancel
Save