Browse Source

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

pull/406/head
qadan 11 years ago
parent
commit
6ea292ea7b
  1. 5
      includes/derivatives.inc
  2. 2
      includes/tuque_wrapper.inc

5
includes/derivatives.inc

@ -60,11 +60,16 @@ function islandora_do_derivatives(AbstractObject $object, array $options) {
require_once $hook['file']; require_once $hook['file'];
} }
foreach ($hook['function'] as $function) { foreach ($hook['function'] as $function) {
if (function_exists($function)) {
$logging = call_user_func($function, $object, $options['force']); $logging = call_user_func($function, $object, $options['force']);
if (!empty($logging)) { if (!empty($logging)) {
$results[] = $logging; $results[] = $logging;
} }
} }
else {
watchdog('islandora', 'Unable to call derivative function @function as it was not found!', array('@function' => $function), WATCHDOG_ERROR);
}
}
} }
return $results; return $results;
} }

2
includes/tuque_wrapper.inc

@ -207,6 +207,7 @@ class IslandoraFedoraApiM extends FedoraApiM {
'params' => $params, 'params' => $params,
); );
islandora_alter_datastream($object, $datastream, $context); islandora_alter_datastream($object, $datastream, $context);
$params = $context['params'];
if (isset($params['lastModifiedDate'])) { if (isset($params['lastModifiedDate'])) {
$params['lastModifiedDate'] = (string) $object[$dsid]->createdDate; $params['lastModifiedDate'] = (string) $object[$dsid]->createdDate;
} }
@ -244,6 +245,7 @@ class IslandoraFedoraApiM extends FedoraApiM {
'params' => $params, 'params' => $params,
); );
islandora_alter_object($object, $context); islandora_alter_object($object, $context);
$params = $context['params'];
try { try {
if ($context['block']) { if ($context['block']) {
throw new Exception('Modify Object was blocked.'); throw new Exception('Modify Object was blocked.');

Loading…
Cancel
Save