Browse Source

updated createDQCEditForm to use fedora_item instead of calling __soap:getDatastreamDissemination directly, now the request is error filtered

pull/129/head
Jason MacWilliams 13 years ago
parent
commit
b345b01a20
  1. 13
      formClass.inc

13
formClass.inc

@ -817,15 +817,12 @@ class formClass {
* @return string
*/
function createQDCEditForm($pid, $dsid, $client, &$form_state) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$dsid = empty($dsid) ? 'QDC' : $dsid;
try {
$params = array('pid' => "$pid", 'dsID' => "$dsid", 'asOfDateTime' => "");
$object = $client->__soapCall('getDatastreamDissemination', array('parameters' => $params));
} catch (Exception $e) {
return array();
}
$content = $object->dissemination->stream;
$content = trim($content);
$item = new fedora_item($pid);
$content = trim($item->get_datastream_dissemination($dsid));
$doc = new DOMDocument();
if (!$doc->loadXML($content)) {
echo "error loading xml";

Loading…
Cancel
Save