|
|
@ -131,7 +131,7 @@ class CollectionClass { |
|
|
|
try { |
|
|
|
try { |
|
|
|
$xml = new SimpleXMLElement($stream); |
|
|
|
$xml = new SimpleXMLElement($stream); |
|
|
|
} catch (Exception $e) { |
|
|
|
} catch (Exception $e) { |
|
|
|
drupal_set_message(t('Error getting relationship element from policy stream !e', array('!e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
drupal_set_message(t('Error getting relationship element from policy stream @e', array('@e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
$relationship = $xml->relationship[0]; |
|
|
|
$relationship = $xml->relationship[0]; |
|
|
@ -172,7 +172,7 @@ class CollectionClass { |
|
|
|
try { |
|
|
|
try { |
|
|
|
$xml = new SimpleXMLElement($stream); |
|
|
|
$xml = new SimpleXMLElement($stream); |
|
|
|
} catch (Exception $e) { |
|
|
|
} catch (Exception $e) { |
|
|
|
drupal_set_message(t('Error getting PID namespace !e', array('!e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
drupal_set_message(t('Error getting PID namespace @e', array('@e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
foreach ($xml->contentmodels->contentmodel as $contentModel) { |
|
|
|
foreach ($xml->contentmodels->contentmodel as $contentModel) { |
|
|
@ -199,7 +199,7 @@ class CollectionClass { |
|
|
|
$xml = new SimpleXMLElement($collection_stream); |
|
|
|
$xml = new SimpleXMLElement($collection_stream); |
|
|
|
} catch (Exception $e) { |
|
|
|
} catch (Exception $e) { |
|
|
|
if ($showError) { |
|
|
|
if ($showError) { |
|
|
|
drupal_set_message(t("!e", array('!e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
drupal_set_message(t('@e', array('@e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
} |
|
|
|
} |
|
|
|
return NULL; |
|
|
|
return NULL; |
|
|
|
} |
|
|
|
} |
|
|
@ -239,7 +239,7 @@ class CollectionClass { |
|
|
|
try { |
|
|
|
try { |
|
|
|
$xml = new SimpleXMLElement($stream); |
|
|
|
$xml = new SimpleXMLElement($stream); |
|
|
|
} catch (Exception $e) { |
|
|
|
} catch (Exception $e) { |
|
|
|
drupal_set_message(t('Error Getting FormHandler: !e', array('!e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
drupal_set_message(t('Error Getting FormHandler: @e', array('@e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
return NULL; |
|
|
|
return NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
$formHandler = $xml->ingest_form; |
|
|
|
$formHandler = $xml->ingest_form; |
|
|
@ -272,7 +272,7 @@ class CollectionClass { |
|
|
|
try { |
|
|
|
try { |
|
|
|
$xml = new SimpleXMLElement($stream); |
|
|
|
$xml = new SimpleXMLElement($stream); |
|
|
|
} catch (Exception $e) { |
|
|
|
} catch (Exception $e) { |
|
|
|
drupal_set_message(t('Error getting content model stream for mime types !e', array('!e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
drupal_set_message(t('Error getting content model stream for mime types @e', array('@e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
foreach ($xml->mimetypes->type as $type) { |
|
|
|
foreach ($xml->mimetypes->type as $type) { |
|
|
@ -302,7 +302,7 @@ class CollectionClass { |
|
|
|
try { |
|
|
|
try { |
|
|
|
$xml = new SimpleXMLElement($stream); |
|
|
|
$xml = new SimpleXMLElement($stream); |
|
|
|
} catch (Exception $e) { |
|
|
|
} catch (Exception $e) { |
|
|
|
drupal_set_message(t('Error getting content model stream !e', array('!e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
drupal_set_message(t('Error getting content model stream @e', array('@e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
return FALSE; |
|
|
|
return FALSE; |
|
|
|
} |
|
|
|
} |
|
|
|
foreach ($xml->ingest_rules->rule as $rule) { |
|
|
|
foreach ($xml->ingest_rules->rule as $rule) { |
|
|
@ -365,7 +365,7 @@ class CollectionClass { |
|
|
|
try { |
|
|
|
try { |
|
|
|
$xml = new SimpleXMLElement($stream); |
|
|
|
$xml = new SimpleXMLElement($stream); |
|
|
|
} catch (Exception $e) { |
|
|
|
} catch (Exception $e) { |
|
|
|
drupal_set_message(t('Error getting ingest form stream !e', array('!e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
drupal_set_message(t('Error getting ingest form stream @e', array('@e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
return FALSE; |
|
|
|
return FALSE; |
|
|
|
} |
|
|
|
} |
|
|
|
$docRoot = $_SERVER['DOCUMENT_ROOT']; |
|
|
|
$docRoot = $_SERVER['DOCUMENT_ROOT']; |
|
|
@ -451,7 +451,7 @@ class CollectionClass { |
|
|
|
$params |
|
|
|
$params |
|
|
|
)); |
|
|
|
)); |
|
|
|
} catch (exception $e) { |
|
|
|
} catch (exception $e) { |
|
|
|
drupal_set_message(t('Error getting Next PID: !e', array('!e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
drupal_set_message(t('Error getting Next PID: @e', array('@e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
return FALSE; |
|
|
|
return FALSE; |
|
|
|
} |
|
|
|
} |
|
|
|
$pid = implode(get_object_vars($object)); |
|
|
|
$pid = implode(get_object_vars($object)); |
|
|
@ -663,7 +663,7 @@ class CollectionClass { |
|
|
|
throw new Exception("Invalid XML."); |
|
|
|
throw new Exception("Invalid XML."); |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (Exception $e) { |
|
|
|
} catch (Exception $e) { |
|
|
|
drupal_set_message(t('!e', array('!e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
drupal_set_message(t('@e', array('@e' => check_plain($e->getMessage()))), 'error'); |
|
|
|
return ''; |
|
|
|
return ''; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|