Browse Source

Merge branch '7.x' of github.com:Islandora/islandora into 7.x

pull/125/merge
Paul Pound 12 years ago
parent
commit
ff90f4806a
  1. 6
      islandora.module

6
islandora.module

@ -216,8 +216,8 @@ function islandora_admin_paths() {
* *
* @return boolean * @return boolean
*/ */
function islandora_access_callback($pid = NULL, $perm = NULL) { function islandora_access_callback($object = NULL, $perm = NULL) {
if(!$pid || !$perm) { if(!$object || !$perm) {
return FALSE; return FALSE;
} }
@ -227,7 +227,7 @@ function islandora_access_callback($pid = NULL, $perm = NULL) {
$namespace_access = TRUE; $namespace_access = TRUE;
} }
else { else {
$pid_namespace = substr($pid, 0, strpos($pid, ':') + 1); //Get the namespace (with colon) $pid_namespace = substr($object->id, 0, strpos($object->id, ':') + 1); //Get the namespace (with colon)
$allowed_namespaces = explode(" ", variable_get('islandora_pids_allowed', 'default: demo: changeme: islandora: ilives: islandora-book: books: newspapers: ')); $allowed_namespaces = explode(" ", variable_get('islandora_pids_allowed', 'default: demo: changeme: islandora: ilives: islandora-book: books: newspapers: '));
$namespace_access = in_array($pid_namespace, $allowed_namespaces); $namespace_access = in_array($pid_namespace, $allowed_namespaces);
} }

Loading…
Cancel
Save