watchdog(t("Fedora_Repository"), t("No roles found in security policy, could not parse policy stream."), NULL, WATCHDOG_ERROR);
watchdog(t("Fedora_Repository"), "No roles found in security policy, could not parse policy stream.", NULL, WATCHDOG_ERROR);
//we may not want to send this to the screen.
drupal_set_message(t('No roles found in security policy, could not parse policy stream: !message', array('!message' => $e->getMessage())), 'error');
drupal_set_message(t('No roles found in security policy, could not parse policy stream: !message', array('!message' => check_plain($e->getMessage()))), 'error');
@ -143,7 +143,7 @@ function fedora_repository_ingest_object($collection_pid=NULL, $collection_label
function fedora_repository_ingest_form_submit(array $form, array &$form_state) {
//only validate the form if the submit button was pressed (other buttons may be used for AHAH
if ($form_state['ahah_submission']) {
$form_state['submitted'] = false;
$form_state['submitted'] = FALSE;
return;
}
if ($form_state['storage']['xml']) {
@ -202,7 +202,7 @@ function fedora_repository_ingest_form_submit(array $form, array &$form_state) {
function fedora_repository_ingest_form_validate($form, &$form_state) {
//only validate the form if the submit button was pressed (other buttons may be used for AHAH
if ($form_state['ahah_submission']) {
$form_state['submitted'] = false;
$form_state['submitted'] = FALSE;
return;
}
if ($form_state['clicked_button']['#id'] == 'edit-submit' && $form_state['ahah_submission'] != 1) {
@ -246,8 +246,11 @@ function fedora_repository_ingest_form_validate($form, &$form_state) {
if (!empty($file)) {
if (!in_array($dformat, $allowedMimeTypes)) {
form_set_error('ingest-file-location', t('The uploaded file\'s mimetype (' . $dformat . ') is not associated with this Content Model. The allowed types are ' .
implode(' ', $allowedMimeTypes)));
form_set_error('ingest-file-location',
t('The uploaded file\'s mimetype') .
' (' . $dformat . ') ' .
t('is not associated with this Content Model. The allowed types are') .
' ' . implode(' ', $allowedMimeTypes));
file_delete($file);
return;
}
@ -505,7 +508,7 @@ function fedora_repository_purge_object_form_validate($form, &$form_state) {
foreach ($contentModels as $contentModel) {
if ($contentModel->pid == 'islandora:collectionCModel') {
$previousElement = NULL; // Used in case we have to nest elements for qualified dublin core.
$label = null;
foreach ($form_values as $key => $value) {
//echo ($key);
if ($key == 'dc:title-0') {
$label = $value;
}
$index = strrpos($key, '-');
$key = substr($key, 0, $index);
$test = substr($key, 0, 2);
@ -400,6 +405,13 @@ class formClass {
}
}
// Save the title
if ( $label != null )
{
$object = new Fedora_Item($form_values['pid']);
$object->modify_object($label);
}
$dom->appendChild($oai);
if (!$client) {
@ -498,7 +510,7 @@ class formClass {
'#title' => t('Content models available'),
'#options' => $potential_models,
'#default_value' => $selected_model,
'#description' => t('Content models define datastream composition, relationships between this and other content models, and the mandatory behaviors associated with each digital object.<br/> Additional information may be found <ahref="https://wiki.duraspace.org/display/FEDORACREATE/Content+Models+Overview">here.</a>'),
'#description' => t('Content models define datastream composition, relationships between this and other content models, and the mandatory behaviors associated with each digital object.<br/> Additional information may be found <ahref="https://wiki.duraspace.org/display/FEDORACREATE/Content+Models+Overview">here.</a>'),
),
),
'collection_pid' => array(
@ -581,6 +593,8 @@ class formClass {
if (!$this->canShowIngestForm($collection_pid)) {
return FALSE;
}
drupal_set_title($collection_label);
if (module_exists('islandora_content_model_forms')) {