Browse Source

Remove deprecated variable: islandora_object['DC']. Address ISLANDORA-970.

pull/618/head
nruest 9 years ago
parent
commit
4f2adef855
  1. 7
      islandora.module
  2. 25
      theme/theme.inc

7
islandora.module

@ -1159,13 +1159,6 @@ function islandora_default_islandora_printer_object($object, $alter) {
$islandora_object = islandora_object_load($object->id); $islandora_object = islandora_object_load($object->id);
$repository = $islandora_object->repository; $repository = $islandora_object->repository;
try {
$dc = $islandora_object['DC']->content;
$dc_object = DublinCore::importFromXMLString($dc);
}
catch (Exception $e) {
drupal_set_message(t('Error retrieving object %s %t', array('%s' => $islandora_object->id, '%t' => $e->getMessage())), 'error', FALSE);
}
$metadata = islandora_retrieve_metadata_markup($object, TRUE); $metadata = islandora_retrieve_metadata_markup($object, TRUE);
$variables = isset($dc_object) ? $dc_object->asArray() : array(); $variables = isset($dc_object) ? $dc_object->asArray() : array();
$output = theme('islandora_object_print_object', array( $output = theme('islandora_object_print_object', array(

25
theme/theme.inc

@ -143,11 +143,6 @@ function islandora_preprocess_islandora_default(&$variables) {
} }
} }
$variables['datastreams'] = $datastreams; $variables['datastreams'] = $datastreams;
// Objects in fcrepo4 don't always contain a DC datastream.
if (isset($islandora_object['DC']) && islandora_datastream_access(ISLANDORA_VIEW_OBJECTS, $islandora_object['DC'])) {
$dc_object = DublinCore::importFromXMLString($islandora_object['DC']->content);
$dc_array = $dc_object->asArray();
}
// We should eventually remove the DC object and dc_array code as it only // We should eventually remove the DC object and dc_array code as it only
// exists to not break legacy implementations. // exists to not break legacy implementations.
$variables['dc_array'] = isset($dc_array) ? $dc_array : array(); $variables['dc_array'] = isset($dc_array) ? $dc_array : array();
@ -329,7 +324,7 @@ function islandora_objects_object_mapper($object_id) {
* - pager: A renderable array for the pager. * - pager: A renderable array for the pager.
* - content: A renderable array for the main content of the page. * - content: A renderable array for the main content of the page.
*/ */
function template_preprocess_islandora_objects_subset(&$variables) { function template_preprocess_islandora_objects_subset(array &$variables) {
$display = (empty($_GET['display'])) ? $variables['display'] : $_GET['display']; $display = (empty($_GET['display'])) ? $variables['display'] : $_GET['display'];
$grid_display = $display == 'grid'; $grid_display = $display == 'grid';
$list_display = !$grid_display; $list_display = !$grid_display;
@ -615,15 +610,6 @@ function theme_islandora_datastream_regenerate_link(array $vars) {
*/ */
function islandora_preprocess_islandora_dublin_core_display(array &$variables) { function islandora_preprocess_islandora_dublin_core_display(array &$variables) {
$islandora_object = $variables['islandora_object']; $islandora_object = $variables['islandora_object'];
if (islandora_datastream_access(ISLANDORA_VIEW_OBJECTS, $islandora_object['DC'])) {
try {
$dc = $islandora_object['DC']->content;
$dc_object = DublinCore::importFromXMLString($dc);
}
catch (Exception $e) {
drupal_set_message(t('Error retrieving object %s %t', array('%s' => $islandora_object->id, '%t' => $e->getMessage())), 'error', FALSE);
}
}
$variables['dc_array'] = isset($dc_object) ? $dc_object->asArray() : array(); $variables['dc_array'] = isset($dc_object) ? $dc_object->asArray() : array();
} }
@ -632,14 +618,5 @@ function islandora_preprocess_islandora_dublin_core_display(array &$variables) {
*/ */
function islandora_preprocess_islandora_dublin_core_description(array &$variables) { function islandora_preprocess_islandora_dublin_core_description(array &$variables) {
$islandora_object = $variables['islandora_object']; $islandora_object = $variables['islandora_object'];
if (islandora_datastream_access(ISLANDORA_VIEW_OBJECTS, $islandora_object['DC'])) {
try {
$dc = $islandora_object['DC']->content;
$dc_object = DublinCore::importFromXMLString($dc);
}
catch (Exception $e) {
drupal_set_message(t('Error retrieving object %s %t', array('%s' => $islandora_object->id, '%t' => $e->getMessage())), 'error', FALSE);
}
}
$variables['dc_array'] = isset($dc_object) ? $dc_object->asArray() : array(); $variables['dc_array'] = isset($dc_object) ? $dc_object->asArray() : array();
} }

Loading…
Cancel
Save