Browse Source

Fix a couple code-style issues in inline comments.

pull/316/head
Adam Vessey 12 years ago
parent
commit
bc5717f16e
  1. 58
      includes/utilities.inc
  2. 2
      tests/islandora_manage_permissions.test

58
includes/utilities.inc

@ -380,18 +380,13 @@ function islandora_get_datastreams_requirements_from_models(array $models) {
* determine what datastreams are required. * determine what datastreams are required.
* *
* @return array * @return array
* The DS-COMPOSITE-MODEL defined datastreams that are required for the given * An associative array mapping datastream IDs to associative arrays
* object. * containing the values parsed from the DS-COMPOSITE-MODEL on the given
* * object--of the form:
* @code * - DSID: A datastream ID being described.
* array( * - "id": A string containing ID of the datastream.
* 'DC' => array( * - "mime": A array containing MIME-types the stream may have.
* 'id' => 'DC', * - "optional": A boolean indicating if the given stream is optional.
* 'mime' => 'text/xml',
* 'optional' => FALSE,
* )
* )
* @endcode
*/ */
function islandora_get_datastreams_requirements_from_content_model(FedoraObject $object) { function islandora_get_datastreams_requirements_from_content_model(FedoraObject $object) {
if (empty($object[DS_COMP_STREAM])) { if (empty($object[DS_COMP_STREAM])) {
@ -621,33 +616,24 @@ function islandora_system_settings_form_default_value($name, $default_value, arr
/** /**
* Returns basic information about DS-COMPOSITE-MODEL. * Returns basic information about DS-COMPOSITE-MODEL.
* *
* @deprecated
* The pre-existing--and more flexible--
* islandora_get_datastreams_requirements_from_content_model() should be
* preferred, as it addresses the case where a stream can be allowed to have
* one of a set of mimetypes (this functions appears to only return the last
* declared mimetype for a given datastream).
*
* @param string $pid * @param string $pid
* PID of content model containing DS_COMP stream. * The PID of content model containing DS_COMP stream.
* *
* @return array * @return array
* array of values in the following form * An associative array mapping datastream IDs to an associative array
* * representing the parsed DS-COMPOSITE-MODEL of the form:
* [DC] => Array * - DSID: A string containing the datastream ID.
* ( * - "mimetype": A string containing the last mimetype declared for the
* [mimetype] => text/xml * given datastream ID.
* ) * - "optional": An optional boolean indicating that the given datastream
* * is optional.
* [MODS] => Array
* (
* [optional] => true
* [mimetype] => text/xml
* )
*
* [RELS-EXT] => Array
* (
* [mimetype] => application/rdf+xml
* )
*
* [RELS-INT] => Array
* (
* [optional] => true
* [mimetype] => application/rdf+xml
* )
*/ */
function islandora_get_comp_ds_mappings($pid) { function islandora_get_comp_ds_mappings($pid) {
$cm_object = islandora_object_load($pid); $cm_object = islandora_object_load($pid);

2
tests/islandora_manage_permissions.test

@ -90,7 +90,7 @@ class IslandoraPermissionsTestCase extends IslandoraWebTestCase {
*/ */
public function testAccessFunctions() { public function testAccessFunctions() {
$object = islandora_object_load(variable_get('islandora_repository_pid', 'islandora:root')); $object = islandora_object_load(variable_get('islandora_repository_pid', 'islandora:root'));
// Test islandora_user_access(); // Test islandora_user_access().
// Test no object/permissions. // Test no object/permissions.
$ret = islandora_user_access(NULL, array()); $ret = islandora_user_access(NULL, array());
$this->assertFalse($ret, 'User access denied when no object/permissions are provided.'); $this->assertFalse($ret, 'User access denied when no object/permissions are provided.');

Loading…
Cancel
Save