From f92e2267037a7d1384719b293600e6fb692ed9f1 Mon Sep 17 00:00:00 2001 From: Alexander O'Neill Date: Fri, 21 Jan 2011 15:58:47 -0400 Subject: [PATCH] Fixed problem of available datastream list. --- CollectionClass.inc | 2 +- fedora_repository.module | 2 +- formClass.inc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CollectionClass.inc b/CollectionClass.inc index 7e2b3626..266f04e1 100644 --- a/CollectionClass.inc +++ b/CollectionClass.inc @@ -445,7 +445,7 @@ class CollectionClass { $tabset['my_tabset']['third_tab']['tabset']['view'] = array( '#type' => 'tabpage', '#title' => t('View'), - '#content' => $dc_html . $ds_list . drupal_get_form('add_stream_form', $this->pid), + '#content' => $dc_html . $ds_list, ); if (fedora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $this->pid, $user)) { diff --git a/fedora_repository.module b/fedora_repository.module index 16f42c33..a4171e4f 100644 --- a/fedora_repository.module +++ b/fedora_repository.module @@ -356,7 +356,7 @@ function add_stream_form_validate($form, &$form_state) { return FALSE; } if (!(preg_match("/^[a-zA-Z]/", $dsid))) { - form_set_error('', t('Data stream ID has to start with a letter.')); + form_set_error('', t("Data stream ID ($dsid) has to start with a letter.")); return FALSE; } if (strlen($dsLabel) > 64) { diff --git a/formClass.inc b/formClass.inc index 356f31f3..72ecac17 100644 --- a/formClass.inc +++ b/formClass.inc @@ -704,7 +704,7 @@ class formClass { '#weight' => '-1', '#description' => t('Datastream IDs defined by the content model.'), ); - $form['stream_id']['#options'] = $unused_dsids; + $form['stream_id']['#options'] = array_combine($unused_dsids, $unused_dsids); } else { $form['stream_id'] = array(