You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
801 B
34 lines
801 B
<?php |
|
|
|
/** |
|
* @file |
|
* Hook implementations tested in hooked_access.test |
|
*/ |
|
|
|
/** |
|
* Implements hook_islandora_object_access(). |
|
*/ |
|
function islandora_hooked_access_test_islandora_object_access($op, $object, $user) { |
|
if ($op == ISLANDORA_PURGE) { |
|
return FALSE; |
|
} |
|
if (isset($_SESSION['islandora_hooked_access_test']) && $_SESSION['islandora_hooked_access_test'] === func_get_args()) { |
|
return TRUE; |
|
} |
|
|
|
return NULL; |
|
} |
|
|
|
/** |
|
* Implements hook_islandora_datastream_access(). |
|
*/ |
|
function islandora_hooked_access_test_islandora_datastream_access($op, $datastream, $user) { |
|
if ($op == ISLANDORA_PURGE) { |
|
return FALSE; |
|
} |
|
if (isset($_SESSION['islandora_hooked_access_test']) && $_SESSION['islandora_hooked_access_test'] === func_get_args()) { |
|
return TRUE; |
|
} |
|
|
|
return NULL; |
|
}
|
|
|