Browse Source

Comply with drupalpractice sniffs

pull/695/head
Jonathan Green 7 years ago
parent
commit
a12780051d
No known key found for this signature in database
GPG Key ID: E96938FA4DF26243
  1. 2
      .travis.yml
  2. 2
      includes/add_datastream.form.inc
  3. 6
      includes/admin.form.inc
  4. 2
      includes/authtokens.inc
  5. 2
      includes/datastream.inc
  6. 1
      includes/datastream.version.inc
  7. 8
      includes/dublin_core.inc
  8. 3
      includes/ingest.form.inc
  9. 1
      includes/mime_detect.inc
  10. 8
      includes/object_properties.form.inc
  11. 7
      includes/solution_packs.inc
  12. 2
      includes/tuque.inc
  13. 10
      includes/utilities.inc
  14. 2
      islandora.api.php
  15. 2
      islandora.drush.inc
  16. 15
      islandora.module
  17. 22
      tests/datastream_cache.test
  18. 3
      tests/datastream_validator_tests.test
  19. 10
      tests/derivatives.test
  20. 11
      tests/includes/datastream_validators.inc
  21. 0
      tests/modules/islandora_derivatives_test/islandora_derivatives_test.info
  22. 0
      tests/modules/islandora_derivatives_test/islandora_derivatives_test.module
  23. 0
      tests/modules/islandora_hooked_access_test/islandora_hooked_access_test.info
  24. 0
      tests/modules/islandora_hooked_access_test/islandora_hooked_access_test.module
  25. 0
      tests/modules/islandora_hooks_test/islandora_hooks_test.info
  26. 0
      tests/modules/islandora_hooks_test/islandora_hooks_test.module
  27. 0
      tests/modules/islandora_ingest_test/islandora_ingest_test.info
  28. 1
      tests/modules/islandora_ingest_test/islandora_ingest_test.module
  29. 2
      theme/islandora-object-edit.tpl.php
  30. 2
      theme/theme.inc

2
.travis.yml

@ -49,7 +49,7 @@ before_script:
script:
- ant -buildfile sites/all/modules/islandora/build.xml lint
- $ISLANDORA_DIR/tests/scripts/line_endings.sh sites/all/modules/islandora
- $TOOLS_DIR/vendor/bin/phpcs --standard=drupal --ignore=vendor,*.md,*.info,*.txt sites/all/modules/islandora
- $TOOLS_DIR/vendor/bin/phpcs --standard=drupal,drupalpractice --ignore=vendor,*.md,*.info,*.txt sites/all/modules/islandora
- phpcpd --names *.module,*.inc,*.test sites/all/modules/islandora
- php scripts/run-tests.sh --php `phpenv which php` --url http://localhost:8081 --verbose "Islandora"
after_failure:

2
includes/add_datastream.form.inc

@ -201,7 +201,7 @@ function islandora_add_datastream_form_submit(array $form, array &$form_state) {
file_delete($file);
}
catch (exception $e) {
drupal_set_message(t('@message', array('@message' => check_plain($e->getMessage()))), 'error');
drupal_set_message(t('@message', array('@message' => $e->getMessage())), 'error');
// Make sure to delete anyways.
file_delete($file);
return;

6
includes/admin.form.inc

@ -224,20 +224,20 @@ function islandora_admin_settings_form_repository_access_message($url) {
}
}
if ($info && $dc) {
$confirmation_message = theme_image(array('path' => 'misc/watchdog-ok.png', 'attributes' => array()));
$confirmation_message = theme('image', array('path' => 'misc/watchdog-ok.png', 'attributes' => array()));
$confirmation_message .= t('Successfully connected to Fedora Server (Version !version).', array(
'!version' => $info['repositoryVersion'],
));
}
elseif ($info) {
$confirmation_message = theme_image(array('path' => 'misc/watchdog-warning.png', 'attributes' => array()));
$confirmation_message = theme('image', array('path' => 'misc/watchdog-warning.png', 'attributes' => array()));
$confirmation_message .= t('Unable to authenticate when connecting to to Fedora Server (Version !version). Please configure the !filter.', array(
'!version' => $info['repositoryVersion'],
'!filter' => 'Drupal Filter',
));
}
else {
$confirmation_message = theme_image(array('path' => 'misc/watchdog-error.png', 'attributes' => array()));
$confirmation_message = theme('image', array('path' => 'misc/watchdog-error.png', 'attributes' => array()));
$confirmation_message .= t('Unable to connect to Fedora server at !islandora_url', array(
'!islandora_url' => $url,
));

2
includes/authtokens.inc

@ -37,7 +37,7 @@ function islandora_get_object_token($pid, $dsid, $uses = 1) {
global $user;
$time = time();
$token = bin2hex(drupal_random_bytes(32));
$id = db_insert("islandora_authtokens")->fields(
db_insert("islandora_authtokens")->fields(
array(
'token' => $token,
'uid' => $user->uid,

2
includes/datastream.inc

@ -132,7 +132,7 @@ function islandora_view_datastream(AbstractDatastream $datastream, $download = F
function islandora_parse_http_match_headers($header_value) {
$matches = array();
// Match the CSV-like structure supported by the HTTP headers.
$count = preg_match_all('/(((W\/)?("?)(\*|.+?)\4)(, +)?)/', $header_value, $matches);
preg_match_all('/(((W\/)?("?)(\*|.+?)\4)(, +)?)/', $header_value, $matches);
// The fifth sub-expression/group is which will contain the etags.
return $matches[5];
}

1
includes/datastream.version.inc

@ -28,7 +28,6 @@ function islandora_datastream_version_table($datastream) {
$row = array();
$reponsibility = $parent->owner;
foreach ($audit_values as $audit_value) {
$internal = $datastream_version->createdDate;
if ($audit_value['date'] == $datastream_version->createdDate) {
$reponsibility = $audit_value['responsibility'];
}

8
includes/dublin_core.inc

@ -11,8 +11,13 @@
/**
* Dublin Core Class.
*/
// @codingStandardsIgnoreLine
class DublinCore {
/**
* Array of items in DC.
*
* @var array
*/
public $dc = array(
'dc:title' => array(),
'dc:creator' => array(),
@ -30,7 +35,6 @@ class DublinCore {
'dc:coverage' => array(),
'dc:rights' => array(),
);
public $owner;
/**
* Constructor.

3
includes/ingest.form.inc

@ -515,7 +515,7 @@ function islandora_ingest_form_add_step_context(array &$form, array $form_state)
if (!isset($shared_storage['collection'])) {
$shared_storage['collection'] = NULL;
}
foreach ($shared_storage['models'] as $key => $value) {
foreach ($shared_storage['models'] as $value) {
$fedora_cmodel = islandora_object_load($value);
if ($fedora_cmodel) {
if (is_array($shared_storage['collection'])) {
@ -945,6 +945,7 @@ function islandora_ingest_form_load_include(array &$form_state) {
if (isset($step['file']) && isset($step['module'])) {
$matches = array();
preg_match('/^(.*)\.(.*)$/', $step['file'], $matches);
// @codingStandardsIgnoreLine
list($file, $name, $type) = $matches;
form_load_include($form_state, $type, $step['module'], $name);
}

1
includes/mime_detect.inc

@ -24,6 +24,7 @@
/**
* Class for doing mapping to mimetypes.
*/
// @codingStandardsIgnoreLine
class MimeDetect {
/**
* This is a shortlist of mimetypes.

8
includes/object_properties.form.inc

@ -68,7 +68,11 @@ function islandora_object_properties_form(array $form, array &$form_state, Abstr
'#required' => TRUE,
'#description' => t("The object's state (active, inactive or deleted)"),
'#type' => 'select',
'#options' => array('A' => 'Active', 'I' => 'Inactive', 'D' => 'Deleted'),
'#options' => array(
'A' => t('Active'),
'I' => t('Inactive'),
'D' => t('Deleted'),
),
),
'propogate' => array(
'#title' => t('Apply changes to related objects?'),
@ -151,7 +155,7 @@ function islandora_object_properties_form_submit(array $form, array &$form_state
if (isset($label) && $label != $object->label) {
try {
$object->label = $label;
drupal_set_message(t('Successfully updated label %s', array('%s' => check_plain($label))));
drupal_set_message(t('Successfully updated label %s', array('%s' => $label)));
}
catch (Exception $e) {
form_set_error(t('Error updating label %s', array('%s' => $e->getMessage())));

7
includes/solution_packs.inc

@ -109,8 +109,8 @@ function islandora_solution_pack_form(array $form, array &$form_state, $solution
// The order is important in terms of severity of the status, where higher
// index indicates the status is more serious, this will be used to determine
// what messages get displayed to the user.
$ok_image = theme_image(array('path' => 'misc/watchdog-ok.png', 'attributes' => array()));
$warning_image = theme_image(array('path' => 'misc/watchdog-warning.png', 'attributes' => array()));
$ok_image = theme('image', array('path' => 'misc/watchdog-ok.png', 'attributes' => array()));
$warning_image = theme('image', array('path' => 'misc/watchdog-warning.png', 'attributes' => array()));
$status_info = array(
'up_to_date' => array(
'solution_pack' => t('All required objects are installed and up-to-date.'),
@ -380,9 +380,6 @@ function islandora_install_solution_pack($module, $op = 'install', $force = FALS
drupal_load('module', 'islandora');
module_load_include('inc', 'islandora', 'includes/utilities');
drupal_load('module', $module);
$info_file = drupal_get_path('module', $module) . "/{$module}.info";
$info_array = drupal_parse_info_file($info_file);
$module_name = $info_array['name'];
if (!islandora_describe_repository()) {
$msg = $t('@module: Did not install any objects. Could not connect to the repository. Please check the settings on the !config_link page and install the required objects manually on the !admin_link page.', $t_params);
drupal_set_message(filter_xss($msg), 'error');

2
includes/tuque.inc

@ -71,7 +71,7 @@ class IslandoraTuque {
*/
public function __construct($user = NULL, $url = NULL) {
if (!isset($user)) {
global $user;
$user = $GLOBALS['user'];;
}
if ($user->uid == 0) {

10
includes/utilities.inc

@ -598,7 +598,7 @@ function islandora_display_repository_inaccessible_message() {
function islandora_executable_available_message($path, $version = NULL, $required_version = NULL) {
$available = is_executable($path);
if ($available) {
$image = theme_image(array('path' => 'misc/watchdog-ok.png', 'attributes' => array()));
$image = theme('image', array('path' => 'misc/watchdog-ok.png', 'attributes' => array()));
$message = t('Executable found at @path', array('@path' => $path));
if ($version) {
$message .= t('<br/>Version: @version', array('@version' => $version));
@ -606,12 +606,12 @@ function islandora_executable_available_message($path, $version = NULL, $require
if ($required_version) {
$message .= t('<br/>Required Version: @version', array('@version' => $required_version));
if (version_compare($version, $required_version) < 0) {
$image = theme_image(array('path' => 'misc/watchdog-error.png', 'attributes' => array()));
$image = theme('image', array('path' => 'misc/watchdog-error.png', 'attributes' => array()));
}
}
}
else {
$image = theme_image(array('path' => 'misc/watchdog-error.png', 'attributes' => array()));
$image = theme('image', array('path' => 'misc/watchdog-error.png', 'attributes' => array()));
$message = t('Unable to locate executable at @path', array('@path' => $path));
}
return $image . $message;
@ -629,11 +629,11 @@ function islandora_executable_available_message($path, $version = NULL, $require
function islandora_directory_exists_message($path) {
$available = is_dir($path);
if ($available) {
$image = theme_image(array('path' => 'misc/watchdog-ok.png', 'attributes' => array()));
$image = theme('image', array('path' => 'misc/watchdog-ok.png', 'attributes' => array()));
$message = t('Directory found at @path', array('@path' => $path));
}
else {
$image = theme_image(array('path' => 'misc/watchdog-error.png', 'attributes' => array()));
$image = theme('image', array('path' => 'misc/watchdog-error.png', 'attributes' => array()));
$message = t('Unable to locate directory at @path', array('@path' => $path));
}
return $image . $message;

2
islandora.api.php

@ -943,5 +943,5 @@ function hook_islandora_breadcrumbs_backends() {
*/
function callback_islandora_breadcrumbs_backends(AbstractObject $object) {
// Do something to get an array of breadcrumb links for $object, root first.
return array($root_link, $collection_link, $object_link);
return array('root_link', 'collection_link', 'object_link');
}

2
islandora.drush.inc

@ -175,7 +175,7 @@ function drush_islandora_solution_pack_install_content_models() {
if (module_exists($module)) {
$info = islandora_solution_packs_get_required_objects($module);
$objects_to_add = array();
foreach ($info['objects'] as $key => $candidate) {
foreach ($info['objects'] as $candidate) {
if (in_array('fedora-system:ContentModel-3.0', $candidate->models)) {
$objects_to_add[] = $candidate;
}

15
islandora.module

@ -369,7 +369,7 @@ function islandora_menu() {
'title' => 'Event Status',
'page callback' => 'islandora_event_status',
'type' => MENU_CALLBACK,
'access callback' => TRUE,
'access arguments' => array(ISLANDORA_VIEW_OBJECTS),
'file' => 'includes/utilities.inc',
);
$items[ISLANDORA_CONTENT_MODELS_AUTOCOMPLETE] = array(
@ -801,7 +801,7 @@ function islandora_user_access($object_or_datastream, array $permissions, array
}
}
else {
global $user;
$user = $GLOBALS['user'];
}
}
@ -1151,7 +1151,6 @@ function islandora_default_islandora_printer_object(AbstractObject $object, $alt
drupal_add_css($path . '/css/islandora.print.css');
$islandora_object = islandora_object_load($object->id);
$repository = $islandora_object->repository;
try {
$dc = $islandora_object['DC']->content;
@ -1672,7 +1671,7 @@ function islandora_object_access($op, $object, $user = NULL) {
return FALSE;
}
if ($user === NULL) {
global $user;
$user = $GLOBALS['user'];
}
// Populate the cache on a miss.
@ -1721,7 +1720,7 @@ function islandora_datastream_access($op, $datastream, $user = NULL) {
return NULL;
}
if ($user === NULL) {
global $user;
$user = $GLOBALS['user'];
}
// Populate the cache on a miss.
@ -1848,13 +1847,13 @@ function islandora_form_simpletest_test_form_alter(array &$form) {
$filter_path = $configuration['drupal_filter_file'];
$filter_status = is_writable($filter_path);
if ($filter_status) {
$filter_status_message = theme_image(array('path' => 'misc/watchdog-ok.png', 'attributes' => array())) . " ";
$filter_status_message = theme('image', array('path' => 'misc/watchdog-ok.png', 'attributes' => array())) . " ";
$filter_status_message .= t("Drupal filter at <strong>@filter_path</strong> is writable by the server.", array(
'@filter_path' => $filter_path,
));
}
else {
$filter_status_message = theme_image(array('path' => 'misc/watchdog-error.png', 'attributes' => array())) . " ";
$filter_status_message = theme('image', array('path' => 'misc/watchdog-error.png', 'attributes' => array())) . " ";
$filter_status_message .= t("Drupal filter at <strong>@filter_path</strong> is not writable by the server. Please make sure your webserver has permission to write to the Drupal filter. If the path given is incorrect, you will need to change it in your server's test config file, located in the Islandora module's 'tests' folder as test_config.ini or default.test_config.ini.", array(
'@filter_path' => $filter_path,
));
@ -2004,7 +2003,7 @@ function islandora_islandora_datastream_access($op, AbstractDatastream $datastre
function islandora_find_package($package_name) {
$results = system_get_info('module');
$found = FALSE;
foreach ($results as $name => $values) {
foreach ($results as $values) {
if ($values['package'] == $package_name) {
$found = TRUE;
break;

22
tests/datastream_cache.test

@ -85,33 +85,33 @@ class IslandoraDatastreamCacheTestCase extends IslandoraWebTestCase {
$this->drupalLogin($user);
// Test If-Modified-Since.
$result = $this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
'If-Modified-Since: ' . $datastream->createdDate->format('D, d M Y H:i:s \G\M\T'),
));
$this->assertResponse(304);
$result = $this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
'If-Modified-Since: ' . $datastream->createdDate->sub(new DateInterval('P1M'))->format('D, d M Y H:i:s \G\M\T'),
));
$this->assertResponse(200);
// Test If-Unmodified-Since.
$result = $this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
'If-Unmodified-Since: ' . $datastream->createdDate->format('D, d M Y H:i:s \G\M\T'),
));
$this->assertResponse(200);
$result = $this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
'If-Unmodified-Since: ' . $datastream->createdDate->sub(new DateInterval('P1M'))->format('D, d M Y H:i:s \G\M\T'),
));
$this->assertResponse(412);
// Test If-Match.
$result = $this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
format_string('If-Match: "!checksum"', array(
'!checksum' => $datastream->checksum,
)),
));
$this->assertResponse(200);
$result = $this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
format_string('If-Match: "!checksum"', array(
'!checksum' => 'dont-match' . $datastream->checksum,
)),
@ -119,13 +119,13 @@ class IslandoraDatastreamCacheTestCase extends IslandoraWebTestCase {
$this->assertResponse(412);
// Test If-None-Match.
$result = $this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
format_string('If-None-Match: "!checksum"', array(
'!checksum' => $datastream->checksum,
)),
));
$this->assertResponse(304);
$result = $this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
format_string('If-None-Match: "!checksum"', array(
'!checksum' => 'dont-match' . $datastream->checksum,
)),
@ -133,21 +133,21 @@ class IslandoraDatastreamCacheTestCase extends IslandoraWebTestCase {
$this->assertResponse(200);
// Test combination of If-None-Match and If-Modified-Since.
$result = $this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
'If-Modified-Since: ' . $datastream->createdDate->format('D, d M Y H:i:s \G\M\T'),
format_string('If-None-Match: "!checksum"', array(
'!checksum' => $datastream->checksum,
)),
));
$this->assertResponse(304);
$result = $this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
'If-Modified-Since: ' . $datastream->createdDate->format('D, d M Y H:i:s \G\M\T'),
format_string('If-None-Match: "!checksum"', array(
'!checksum' => 'dont-match' . $datastream->checksum,
)),
));
$this->assertResponse(200);
$result = $this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
'If-Modified-Since: ' . $datastream->createdDate->sub(new DateInterval('P1M'))->format('D, d M Y H:i:s \G\M\T'),
format_string('If-None-Match: "!checksum"', array(
'!checksum' => $datastream->checksum,

3
tests/datastream_validator_tests.test

@ -8,6 +8,7 @@
/**
* A test DatastreamValidator for the DatastreamValidatorResultTestCase.
*/
// @codingStandardsIgnoreLine
class TestDatastreamValidator extends DatastreamValidator {
/**
@ -29,6 +30,7 @@ class TestDatastreamValidator extends DatastreamValidator {
/**
* Tests the ability of DatastreamValidators to produce correct results.
*/
// @codingStandardsIgnoreLine
class DatastreamValidatorResultTestCase extends IslandoraWebTestCase {
/**
@ -121,6 +123,7 @@ class DatastreamValidatorResultTestCase extends IslandoraWebTestCase {
/**
* Procedurally generated tests for DatastreamValidators.
*/
// @codingStandardsIgnoreLine
class PrefixDatastreamValidatorTestCase extends IslandoraWebTestCase {
/**

10
tests/derivatives.test

@ -44,16 +44,6 @@ class IslandoraDerivativesTestCase extends IslandoraWebTestCase {
$this->pid = $this->randomName() . ":" . $this->randomName();
}
/**
* Free any objects/resources created for this test.
*
* @see IslandoraWebTestCase::tearDown()
*/
public function tearDown() {
$tuque = islandora_get_tuque_connection();
parent::tearDown();
}
/**
* Tests that the islandora_islandora_object_ingested hook gets fired.
*/

11
tests/includes/datastream_validators.inc

@ -65,6 +65,7 @@ function islandora_hex2int($hex) {
* all the test results using getPasses() and getFails() and transforms those
* into something that DrupalWebTestCase can use.
*/
// @codingStandardsIgnoreLine
abstract class DatastreamValidator extends IslandoraTestUtilityClass {
/**
@ -199,6 +200,7 @@ abstract class DatastreamValidator extends IslandoraTestUtilityClass {
* of image files can be checked. Please check the documentation for the PHPGD
* imagecreatefromstring() function to determine what filetypes are valid.
*/
// @codingStandardsIgnoreLine
class ImageDatastreamValidator extends DatastreamValidator {
/**
@ -217,6 +219,7 @@ class ImageDatastreamValidator extends DatastreamValidator {
/**
* Asserts the validity of any .tif/.tiff datastream.
*/
// @codingStandardsIgnoreLine
class TIFFDatastreamValidator extends DatastreamValidator {
/**
@ -258,6 +261,7 @@ class TIFFDatastreamValidator extends DatastreamValidator {
/**
* Asserts the validity of a JP2 datastream.
*/
// @codingStandardsIgnoreLine
class JP2DatastreamValidator extends DatastreamValidator {
/**
@ -293,6 +297,7 @@ class JP2DatastreamValidator extends DatastreamValidator {
/**
* Asserts the validity of a PDF datastream.
*/
// @codingStandardsIgnoreLine
class PDFDatastreamValidator extends DatastreamValidator {
/**
@ -339,6 +344,7 @@ class PDFDatastreamValidator extends DatastreamValidator {
* is the string we're looking to find in the datastream, and the second is an
* integer representing the number of times it should appear in the datastream.
*/
// @codingStandardsIgnoreLine
class TextDatastreamValidator extends DatastreamValidator {
/**
@ -383,6 +389,7 @@ class TextDatastreamValidator extends DatastreamValidator {
* declared chunk sizes against actual sizes. If any of these are off, WAV
* players will fail to function.
*/
// @codingStandardsIgnoreLine
class WAVDatastreamValidator extends DatastreamValidator {
/**
@ -519,6 +526,7 @@ class WAVDatastreamValidator extends DatastreamValidator {
* VBR settings. Otherwise, we look for the basic MP3 signature 'fffa' or 'fffb'
* at the start of the binary.
*/
// @codingStandardsIgnoreLine
class MP3DatastreamValidator extends DatastreamValidator {
/**
@ -610,6 +618,7 @@ class MP3DatastreamValidator extends DatastreamValidator {
* a four-character filetype code. Here, we look for 'ftyp', and then pass the
* filetype code to the test message.
*/
// @codingStandardsIgnoreLine
class MP4DatastreamValidator extends DatastreamValidator {
/**
@ -635,6 +644,7 @@ class MP4DatastreamValidator extends DatastreamValidator {
* one OGG page, and confirming that the file asserts the Theora and Vorbis
* codecs were used to create the file.
*/
// @codingStandardsIgnoreLine
class OGGDatastreamValidator extends DatastreamValidator {
/**
@ -683,6 +693,7 @@ class OGGDatastreamValidator extends DatastreamValidator {
* second, we know that the file will contain the declaration 'matroska' soon
* after.
*/
// @codingStandardsIgnoreLine
class MKVDatastreamValidator extends DatastreamValidator {
/**

0
tests/islandora_derivatives_test.info → tests/modules/islandora_derivatives_test/islandora_derivatives_test.info

0
tests/islandora_derivatives_test.module → tests/modules/islandora_derivatives_test/islandora_derivatives_test.module

0
tests/islandora_hooked_access_test.info → tests/modules/islandora_hooked_access_test/islandora_hooked_access_test.info

0
tests/islandora_hooked_access_test.module → tests/modules/islandora_hooked_access_test/islandora_hooked_access_test.module

0
tests/islandora_hooks_test.info → tests/modules/islandora_hooks_test/islandora_hooks_test.info

0
tests/islandora_hooks_test.module → tests/modules/islandora_hooks_test/islandora_hooks_test.module

0
tests/islandora_ingest_test.info → tests/modules/islandora_ingest_test/islandora_ingest_test.info

1
tests/islandora_ingest_test.module → tests/modules/islandora_ingest_test/islandora_ingest_test.module

@ -14,6 +14,7 @@ function islandora_ingest_test_menu() {
'title' => 'Ingest Form',
'page callback' => 'islandora_ingest_test_ingest',
'type' => MENU_LOCAL_ACTION,
// No access restriction because its a test module.
'access callback' => TRUE,
),
);

2
theme/islandora-object-edit.tpl.php

@ -17,4 +17,4 @@
* this is the case for all dc elements.
*/
?>
<?php print (theme_table($variables['datastream_table'])); ?>
<?php print (theme('table', $variables['datastream_table'])); ?>

2
theme/theme.inc

@ -11,7 +11,6 @@
function template_preprocess_islandora_default_edit(array &$variables) {
global $base_url;
$islandora_object = $variables['islandora_object'];
$datastreams = array();
$variables['islandora_editmetadata_url'] = $base_url . '/islandora/edit_form/' . $islandora_object->id;
module_load_include('inc', 'islandora', 'includes/datastream');
module_load_include('inc', 'islandora', 'includes/utilities');
@ -125,7 +124,6 @@ function template_preprocess_islandora_default(&$variables) {
$datastreams = array();
foreach ($islandora_object as $ds) {
try {
$pid = $islandora_object->id;
$id = $ds->id;
$label = $ds->label;
$download_path = islandora_datastream_get_url($ds, 'download');

Loading…
Cancel
Save