Browse Source

Merge pull request #91 from bwoodhead/6.x

Improved error handling and removed getDataStreamDissemination false positive
pull/92/merge
Ben Woodhead 13 years ago
parent
commit
e48b828e99
  1. 1
      ContentModel.inc
  2. 9
      api/fedora_item.inc

1
ContentModel.inc

@ -1374,6 +1374,7 @@ class ContentModel extends XMLDatastream {
else { else {
$status = $class->$methodName($param_array, $method->getAttribute('dsid'), $file, $method->getAttribute('modified_files_ext')); $status = $class->$methodName($param_array, $method->getAttribute('dsid'), $file, $method->getAttribute('modified_files_ext'));
if ($status !== TRUE) { if ($status !== TRUE) {
self::$errors[] = 'Execute Ingest Rules: method \'' . $className . '->' . $methodName . '\' failed.';
$ret = FALSE; $ret = FALSE;
} }
} }

9
api/fedora_item.inc

@ -406,15 +406,18 @@ class Fedora_Item {
* Get datastream dissemination * Get datastream dissemination
* @param type $dsid * @param type $dsid
* @param type $as_of_date_time * @param type $as_of_date_time
* @return string * @param type $quiet
* @return null
*/ */
function get_datastream_dissemination($dsid, $as_of_date_time = "") { function get_datastream_dissemination($dsid, $as_of_date_time = "", $quiet=TRUE) {
$params = array( $params = array(
'pid' => $this->pid, 'pid' => $this->pid,
'dsID' => $dsid, 'dsID' => $dsid,
'asOfDateTime' => $as_of_date_time, 'asOfDateTime' => $as_of_date_time,
); );
$object = self::soap_call('getDataStreamDissemination', $params);
// Make soap call with quite
$object = self::soap_call('getDataStreamDissemination', $params, $quiet);
if (!empty($object)) { if (!empty($object)) {
$content = $object->dissemination->stream; $content = $object->dissemination->stream;
$content = trim($content); $content = trim($content);

Loading…
Cancel
Save