Browse Source

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

pull/677/head
Rosie Le Faive 8 years ago
parent
commit
a04be8ab58
  1. 2
      README.md
  2. 2
      includes/mimetype.utils.inc
  3. 13
      includes/tuque_wrapper.inc
  4. 4
      islandora.module
  5. 6
      theme/theme.inc

2
README.md

@ -55,6 +55,8 @@ Further documentation for this module is available at [our wiki](https://wiki.du
## Troubleshooting/Issues ## Troubleshooting/Issues
NOTE: There has been a function signature change for the `ingestDatastream` function within Tuque which will be deprecated after the 7.x-1.10 release. To read about it in detail please see the [JIRA ticket](https://jira.duraspace.org/browse/ISLANDORA-1995). For the time being there is a warning stating that this will become deprecated and that code that utilizes this specific behavior should be updated. Once this code is updated the `islandora_deprecation_return_false_when_datastream_exists` variable may be set to FALSE so the warning no longer displays. An example for doing this with drush: `drush vset islandora_deprecation_return_false_when_datastream_exists FALSE`.
Having problems or solved a problem? Check out the Islandora google groups for a solution. Having problems or solved a problem? Check out the Islandora google groups for a solution.
* [Islandora Group](https://groups.google.com/forum/?hl=en&fromgroups#!forum/islandora) * [Islandora Group](https://groups.google.com/forum/?hl=en&fromgroups#!forum/islandora)

2
includes/mimetype.utils.inc

@ -268,5 +268,7 @@ function islandora_mime_mapping() {
// Web Archives: // Web Archives:
"warc" => "application/warc", "warc" => "application/warc",
"json" => "application/json", "json" => "application/json",
// JSON-LD
"jsonld" => "application/ld+json",
); );
} }

13
includes/tuque_wrapper.inc

@ -240,11 +240,20 @@ class IslandoraFedoraObject extends FedoraObject {
return $ret; return $ret;
} }
catch (Exception $e) { catch (Exception $e) {
watchdog('islandora', 'Failed to ingest object: @pid</br>code: @code<br/>message: @msg', array( if ($e instanceof DatastreamExistsException && variable_get('islandora_deprecation_return_false_when_datastream_exists', TRUE)) {
$message = format_string('The datastream @dsid already exists on the object: @pid. As of 7.x-1.10 the function signature for ingestDatastream will be changed from returning FALSE on failure to throwing an exception.', array(
'@dsid' => $datastream->id,
'@pid' => $object->id,
));
trigger_error(filter_xss($message), E_USER_DEPRECATED);
return FALSE;
}
watchdog('islandora', 'Failed to ingest datastream @dsid on object: @pid</br>code: @code<br/>message: @msg', array(
'@pid' => $object->id, '@pid' => $object->id,
'@dsid' => $datastream->id, '@dsid' => $datastream->id,
'@code' => $e->getCode(), '@code' => $e->getCode(),
'@msg' => $e->getMessage()), WATCHDOG_ERROR); '@msg' => $e->getMessage(),
), WATCHDOG_ERROR);
throw $e; throw $e;
} }
} }

4
islandora.module

@ -1029,6 +1029,10 @@ function islandora_view_object(AbstractObject $object) {
module_load_include('inc', 'islandora', 'includes/breadcrumb'); module_load_include('inc', 'islandora', 'includes/breadcrumb');
module_load_include('inc', 'islandora', 'includes/utilities'); module_load_include('inc', 'islandora', 'includes/utilities');
// Warn if object is inactive or deleted.
if ($object->state != 'A') {
drupal_set_message(t('This object is not active. Metadata may not display correctly.'), 'warning');
}
// Optional pager parameters. // Optional pager parameters.
$page_number = (empty($_GET['page'])) ? '1' : $_GET['page']; $page_number = (empty($_GET['page'])) ? '1' : $_GET['page'];
$page_size = (empty($_GET['pagesize'])) ? '10' : $_GET['pagesize']; $page_size = (empty($_GET['pagesize'])) ? '10' : $_GET['pagesize'];

6
theme/theme.inc

@ -64,18 +64,12 @@ function template_preprocess_islandora_default_edit(array &$variables) {
elseif (user_access(ISLANDORA_VIEW_DATASTREAM_HISTORY)) { elseif (user_access(ISLANDORA_VIEW_DATASTREAM_HISTORY)) {
$row[] = array(); $row[] = array();
} }
if (islandora_datastream_access(ISLANDORA_VIEW_DATASTREAM_HISTORY, $ds)) {
// Add new datastream content as the lastest version.
$row[] = array( $row[] = array(
'class' => 'datastream-replace', 'class' => 'datastream-replace',
'data' => theme('islandora_datastream_replace_link', array( 'data' => theme('islandora_datastream_replace_link', array(
'datastream' => $ds, 'datastream' => $ds,
)), )),
); );
}
else {
$row[] = array();
}
$row[] = array( $row[] = array(
'class' => 'datastream-download', 'class' => 'datastream-download',
'data' => theme('islandora_datastream_download_link', array( 'data' => theme('islandora_datastream_download_link', array(

Loading…
Cancel
Save