Browse Source

Performed some cleanup, made 'restrict datastreams' default to FALSE.

pull/105/head
Alexander O'Neill 14 years ago
parent
commit
ed3e0d3596
  1. 4
      ObjectHelper.inc
  2. 2
      fedora_repository.module
  3. 2
      formClass.inc

4
ObjectHelper.inc

@ -430,7 +430,7 @@ class ObjectHelper {
$dataStreamBody = "<br /><table>\n";
$cmDatastreams = array();
if (variable_get('fedora_object_restrict_datastreams', TRUE) == TRUE && ($cm = ContentModel::loadFromObject($object_pid)) !== FALSE) {
if (variable_get('fedora_object_restrict_datastreams', FALSE) == TRUE && ($cm = ContentModel::loadFromObject($object_pid)) !== FALSE) {
$cmDatastreams = $cm->listDatastreams();
}
@ -439,7 +439,7 @@ class ObjectHelper {
foreach ($object as $datastream) {
foreach ($datastream as $datastreamValue) {
if (variable_get('fedora_object_restrict_datastreams', TRUE) == FALSE || ((isset($user) && in_array('administrator',$user->roles)) || in_array($datastreamValue->ID,$cmDatastreams))) {
if (variable_get('fedora_object_restrict_datastreams', FALSE) == FALSE || ((isset($user) && in_array('administrator',$user->roles)) || in_array($datastreamValue->ID,$cmDatastreams))) {
if ($datastreamValue->ID == 'OBJ') {
$hasOBJStream = '1';
$mainStreamLabel = $datastreamValue->label;

2
fedora_repository.module

@ -1410,7 +1410,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
try {
$item = Fedora_Item::ingest_from_FOXML_file(drupal_get_path('module', 'fedora_repository') . '/content_models/islandora_largeimages.xml');
$tn = $item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/Gnome-emblem-photos.png', 'TN', 'Thumbnail.png', 'image/png', 'M');
drupal_set_message("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:largeImages\">islandora:largeImages</a>.", 'message');
drupal_set_message("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:largeimages\">islandora:largeimages</a>.", 'message');
} catch (exception $e) {
$error .= " - Problem ingesting islandora:largeimages collection";
}

2
formClass.inc

@ -396,7 +396,7 @@ class formClass {
$form['fedora_object_restrict_datastreams'] = array(
'#type' => 'checkbox',
'#title' => t('Restrict Access to Fedora Object Datastreams'),
'#default_value'=> variable_get('fedora_object_restrict_datastreams', TRUE),
'#default_value'=> variable_get('fedora_object_restrict_datastreams', FALSE),
'#description' => t('When enabled, restricts access to fedora object datastreams that are not listed in the Islandora Content Model for the object (unless the user is an administrator).'),
);

Loading…
Cancel
Save