Browse Source

Replaced fedora calls with regex to improve performance.

pull/59/head
ajstanley 13 years ago
parent
commit
e44be2a48c
  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
if ($item) {
$parts = explode(',', $item);
$item = new fedora_item($parts[0]);
$nameparts = explode(':', $parts[0]);
if (!$restricted || in_array($nameparts[0], $allowed))
$datastreams = array_keys($item->get_datastreams_list_as_array());
if (in_array('ISLANDORACM', $datastreams)) {
if (!$restricted || in_array($nameparts[0], $allowed)) {
if (!preg_match('/fedora-system/', $nameparts[0])) {
$options[$parts[0]] = $parts[1] . ' ~ ' . $parts[0];
}
}
}
}
return $options;
}
Loading…
Cancel
Save