Browse Source

Merge pull request #59 from ajstanley/6.x

Replaced fedora calls with regex to improve performance.
pull/60/merge
Ben Woodhead 13 years ago
parent
commit
f7f753bf31
  1. 8
      api/fedora_utils.inc

8
api/fedora_utils.inc

@ -292,15 +292,15 @@ function get_content_models_as_option_array() {
foreach ($list as $item) { //removes blanks foreach ($list as $item) { //removes blanks
if ($item) { if ($item) {
$parts = explode(',', $item); $parts = explode(',', $item);
$item = new fedora_item($parts[0]);
$nameparts = explode(':', $parts[0]); $nameparts = explode(':', $parts[0]);
if (!$restricted || in_array($nameparts[0], $allowed)) if (!$restricted || in_array($nameparts[0], $allowed)) {
$datastreams = array_keys($item->get_datastreams_list_as_array());
if (in_array('ISLANDORACM', $datastreams)) { if (!preg_match('/fedora-system/', $nameparts[0])) {
$options[$parts[0]] = $parts[1] . ' ~ ' . $parts[0]; $options[$parts[0]] = $parts[1] . ' ~ ' . $parts[0];
} }
} }
} }
}
return $options; return $options;
} }
Loading…
Cancel
Save