From 2867e7e5758ff9923b1c682e262a07a09cda8d93 Mon Sep 17 00:00:00 2001 From: jonathangreen Date: Fri, 1 Jun 2012 09:57:43 -0300 Subject: [PATCH] Updated access --- islandora.module | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/islandora.module b/islandora.module index a300e0d7..1a6f33ca 100644 --- a/islandora.module +++ b/islandora.module @@ -216,8 +216,8 @@ function islandora_admin_paths() { * * @return boolean */ -function islandora_access_callback($pid = NULL, $perm = NULL) { - if(!$pid || !$perm) { +function islandora_access_callback($object = NULL, $perm = NULL) { + if(!$object || !$perm) { return FALSE; } @@ -227,7 +227,7 @@ function islandora_access_callback($pid = NULL, $perm = NULL) { $namespace_access = TRUE; } 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: ')); $namespace_access = in_array($pid_namespace, $allowed_namespaces); }