Browse Source

Update as per code review feedback.

pull/680/head
Jordan Dukart 9 years ago
parent
commit
e3d9aad52f
  1. 6
      includes/tuque_wrapper.inc

6
includes/tuque_wrapper.inc

@ -240,11 +240,11 @@ class IslandoraFedoraObject extends FedoraObject {
return $ret; return $ret;
} }
catch (Exception $e) { catch (Exception $e) {
if ($e instanceof DatastreamExistsException) { if ($e instanceof DatastreamExistsException && variable_get('islandora_deprecation_return_false_when_datastream_exists', TRUE)) {
$message = islandora_deprecated('7.x-1.10', t('The datastream @dsid already exists on the object: @pid. After the 7.x-1.10 release this will throw an exception.', array( $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, '@dsid' => $datastream->id,
'@pid' => $object->id, '@pid' => $object->id,
))); ));
trigger_error(filter_xss($message), E_USER_DEPRECATED); trigger_error(filter_xss($message), E_USER_DEPRECATED);
return FALSE; return FALSE;
} }

Loading…
Cancel
Save