|
|
|
@ -161,12 +161,14 @@ function islandora_view_datastream_cache_check(AbstractDatastream $datastream) { |
|
|
|
|
|
|
|
|
|
|
|
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) { |
|
|
|
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) { |
|
|
|
$modified_since = DateTime::createFromFormat('D, d M Y H:i:s e', $_SERVER['HTTP_IF_MODIFIED_SINCE']); |
|
|
|
$modified_since = DateTime::createFromFormat('D, d M Y H:i:s e', $_SERVER['HTTP_IF_MODIFIED_SINCE']); |
|
|
|
if ($datastream->createdDate->getTimestamp() - $modified_since->getTimestamp() > 0) { |
|
|
|
if ($modified_since !== FALSE) { |
|
|
|
// Changed! |
|
|
|
if ($datastream->createdDate->getTimestamp() - $modified_since->getTimestamp() > 0) { |
|
|
|
return $return; |
|
|
|
// Changed! |
|
|
|
} |
|
|
|
return $return; |
|
|
|
else { |
|
|
|
} |
|
|
|
$return = 304; |
|
|
|
else { |
|
|
|
|
|
|
|
$return = 304; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if ($return === 200 && isset($_SERVER['HTTP_IF_UNMODIFIED_SINCE'])) { |
|
|
|
if ($return === 200 && isset($_SERVER['HTTP_IF_UNMODIFIED_SINCE'])) { |
|
|
|
|