Browse Source

Merge https://github.com/Islandora/islandora into ISLANDORA-250

pull/105/head
Adam Vessey 14 years ago
parent
commit
237309380a
  1. 11
      ObjectHelper.inc
  2. 4
      fedora_repository.module
  3. 3
      formClass.inc

11
ObjectHelper.inc

@ -363,7 +363,7 @@ class ObjectHelper {
$ds_list = $item->get_datastreams_list_as_array(); $ds_list = $item->get_datastreams_list_as_array();
$output = $this->getFormattedDC($item); $output = $this->getFormattedDC($item);
$dsid = array_key_exists('QDC', $ds_list) ? 'QDC' : 'DC'; $dsid = array_key_exists('QDC', $ds_list) ? 'QDC' : 'DC';
$path = drupal_get_path('module', 'fedora_repository');
//$baseUrl=substr($baseUrl, 0, (strpos($baseUrl, "/")-1)); //$baseUrl=substr($baseUrl, 0, (strpos($baseUrl, "/")-1));
if (user_access(ObjectHelper :: $EDIT_FEDORA_METADATA)) { if (user_access(ObjectHelper :: $EDIT_FEDORA_METADATA)) {
@ -374,7 +374,7 @@ class ObjectHelper {
if ($allow) { if ($allow) {
$output .= '<br /><a title = "' . t('Edit Meta Data') . '" href="' . $base_url . '/fedora/repository/' . 'editmetadata/' . $pid . '/' . $output .= '<br /><a title = "' . t('Edit Meta Data') . '" href="' . $base_url . '/fedora/repository/' . 'editmetadata/' . $pid . '/' .
$dsId . '"><img src="' . $base_url . '/' . $path . '/images/edit.gif" alt="' . t('Edit Meta Data') . '" /></a>'; $dsid . '"><img src="' . $base_url . '/' . $path . '/images/edit.gif" alt="' . t('Edit Meta Data') . '" /></a>';
} }
} }
@ -850,6 +850,10 @@ class ObjectHelper {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
// Before executing the query, we hve a base case of accessing the top-level collection // Before executing the query, we hve a base case of accessing the top-level collection
global $base_url; global $base_url;
if ($pid == variable_get('fedora_repository_pid', 'islandora:top')){
$breadcrumbs[] = l(t('Digital repository'), 'fedora/repository');
$breadcrumbs[] = l(t('Home'), $base_url);
} else {
$query_string = 'select $parentObject $title $content from <#ri> $query_string = 'select $parentObject $title $content from <#ri>
where (<info:fedora/' . $pid . '> <dc:title> $title where (<info:fedora/' . $pid . '> <dc:title> $title
and $parentObject <fedora-model:hasModel> $content and $parentObject <fedora-model:hasModel> $content
@ -874,13 +878,12 @@ class ObjectHelper {
if ($parent == variable_get('fedora_repository_pid', 'islandora:top')) { if ($parent == variable_get('fedora_repository_pid', 'islandora:top')) {
$breadcrumbs[] = l(t('Digital repository'), 'fedora/repository'); $breadcrumbs[] = l(t('Digital repository'), 'fedora/repository');
$breadcrumbs[] = l(t('Home'), $base_url); $breadcrumbs[] = l(t('Home'), $base_url);
} elseif ($level > 0) { } elseif ($level > 0) {
$this->getBreadcrumbs($parent, $breadcrumbs, $level - 1); $this->getBreadcrumbs($parent, $breadcrumbs, $level - 1);
} }
} }
} }
}
public static function warnIfMisconfigured($app) { public static function warnIfMisconfigured($app) {
$messMap = array( $messMap = array(

4
fedora_repository.module

@ -22,9 +22,7 @@ function fedora_repository_admin() {
return $adminForm->createAdminForm(); return $adminForm->createAdminForm();
} }
function fedora_repository_admin_settings_submit($form, $form_values) {
drupal_set_message("Custom form handler.");
}
/** /**
* drupal hook * drupal hook

3
formClass.inc

@ -380,8 +380,7 @@ class formClass {
$form['#attributes'] = array('enctype' => "multipart/form-data"); $form['#attributes'] = array('enctype' => "multipart/form-data");
// Additional form handling for file uploads.
$form['#submit'][] = 'fedora_repository_admin_settings_submit';
return system_settings_form($form); return system_settings_form($form);
} }

Loading…
Cancel
Save