Browse Source

Fixed problem with page redirects on Edit

pull/58/head
Alan Stanley 13 years ago
parent
commit
b4737ed802
  1. 1
      ObjectHelper.inc
  2. 1
      api/fedora_utils.inc
  3. 4
      fedora_repository.module
  4. 4
      plugins/FedoraObjectDetailedContent.inc

1
ObjectHelper.inc

@ -546,6 +546,7 @@ class ObjectHelper {
*/
function get_content_models_list($pid, $include_fedora_system_content_models = FALSE) {
module_load_include('inc', 'fedora_repository', 'CollectionClass');
module_load_include('inc', 'fedora_repository', 'ContentModel');
$collectionHelper = new CollectionClass();
$pids = array();
$query = 'select $object from <#ri>

1
api/fedora_utils.inc

@ -235,6 +235,7 @@ function fix_dsid($dsid) {
*/
function get_collections_as_option_array() {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
$restricted = variable_get('fedora_namespace_restriction_enforced', TRUE);
$query = 'select $object $title from <#ri>
where ($object <dc:title> $title
and $object <info:fedora/fedora-system:def/model#hasModel> <info:fedora/islandora:collectionCModel>

4
fedora_repository.module

@ -317,7 +317,7 @@ function fedora_repository_purge_object_form(&$form_state, $pid, $referrer = NUL
if (!empty($collectionPid)) {
$collectionPid = $_SESSION['fedora_collection'];
}
//$form['#redirect'] = $referrer;
//$form['#rebuild'] = $false;
return $form;
}
@ -989,7 +989,7 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
$obj = new FedoraObjectDetailedContent($pid);
$object_details = $obj->showFieldSets();
if ($object_details['fedora_object_details']['#selected'] == TRUE) {
foreach ($cmodels_tabs as $cmodel_tab) {
foreach ($cmodels_tabs as &$cmodel_tab) {
if (is_array($cmodel_tab)) {
$cmodel_tab['#selected'] = FALSE;
}

4
plugins/FedoraObjectDetailedContent.inc

@ -39,11 +39,11 @@ class FedoraObjectDetailedContent {
$show_purge_tab = (!empty($_POST['form_id']) && $_POST['form_id'] == 'fedora_repository_purge_object_form');
$show_edit_tab = (!empty($_POST['form_id']) && $_POST['form_id'] == 'fedora_repository_edit_qdc_form');
$purge_form = drupal_get_form('fedora_repository_purge_object_form', $this->pid, check_plain(substr(request_uri(), strlen(base_path()))));
$details_selected = ($show_purge_tab ||$show_edit_tab);
$tabset['fedora_object_details'] = array(
'#type' => 'tabpage',
'#title' => t('Object Details'),
'#selected' => $show_purge_tab,
'#selected' => $details_selected,
);
$tabset['fedora_object_details']['tabset'] = array(
'#type' => 'tabset',

Loading…
Cancel
Save