diff --git a/.travis.yml b/.travis.yml
index 7fb3ce1f..0ff01b32 100644
--- a/.travis.yml
+++ b/.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:
diff --git a/includes/add_datastream.form.inc b/includes/add_datastream.form.inc
index 037fd14f..f7d5b18e 100644
--- a/includes/add_datastream.form.inc
+++ b/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;
diff --git a/includes/admin.form.inc b/includes/admin.form.inc
index 1ee5d289..f72640de 100644
--- a/includes/admin.form.inc
+++ b/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,
));
diff --git a/includes/authtokens.inc b/includes/authtokens.inc
index 055e6464..d8048734 100644
--- a/includes/authtokens.inc
+++ b/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,
diff --git a/includes/datastream.inc b/includes/datastream.inc
index 4311b892..3efb763f 100644
--- a/includes/datastream.inc
+++ b/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];
}
diff --git a/includes/datastream.version.inc b/includes/datastream.version.inc
index 3ad21fe2..55f7b0da 100644
--- a/includes/datastream.version.inc
+++ b/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'];
}
diff --git a/includes/dublin_core.inc b/includes/dublin_core.inc
index 40088e4b..643eccc4 100644
--- a/includes/dublin_core.inc
+++ b/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.
diff --git a/includes/ingest.form.inc b/includes/ingest.form.inc
index f4e530b3..c94cd8b0 100644
--- a/includes/ingest.form.inc
+++ b/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);
}
diff --git a/includes/mime_detect.inc b/includes/mime_detect.inc
index 9ba00829..b77a10a5 100644
--- a/includes/mime_detect.inc
+++ b/includes/mime_detect.inc
@@ -24,6 +24,7 @@
/**
* Class for doing mapping to mimetypes.
*/
+// @codingStandardsIgnoreLine
class MimeDetect {
/**
* This is a shortlist of mimetypes.
diff --git a/includes/object_properties.form.inc b/includes/object_properties.form.inc
index 33016d86..617751e9 100644
--- a/includes/object_properties.form.inc
+++ b/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())));
diff --git a/includes/solution_packs.inc b/includes/solution_packs.inc
index c5c4dff0..d38037f0 100644
--- a/includes/solution_packs.inc
+++ b/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');
diff --git a/includes/tuque.inc b/includes/tuque.inc
index 9cecc1d8..919f10cb 100644
--- a/includes/tuque.inc
+++ b/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) {
diff --git a/includes/utilities.inc b/includes/utilities.inc
index b4e93a6a..c3bb4dbf 100644
--- a/includes/utilities.inc
+++ b/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('
Version: @version', array('@version' => $version));
@@ -606,12 +606,12 @@ function islandora_executable_available_message($path, $version = NULL, $require
if ($required_version) {
$message .= t('
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;
diff --git a/islandora.api.php b/islandora.api.php
index aa344850..4594e344 100644
--- a/islandora.api.php
+++ b/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');
}
diff --git a/islandora.drush.inc b/islandora.drush.inc
index 876f6e39..38c26ce1 100644
--- a/islandora.drush.inc
+++ b/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;
}
diff --git a/islandora.module b/islandora.module
index b0f7abf5..37c2b856 100644
--- a/islandora.module
+++ b/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 @filter_path 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 @filter_path 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;
diff --git a/tests/datastream_cache.test b/tests/datastream_cache.test
index 8e1e7d30..eccc6b10 100644
--- a/tests/datastream_cache.test
+++ b/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,
diff --git a/tests/datastream_validator_tests.test b/tests/datastream_validator_tests.test
index adfe67f7..99679841 100644
--- a/tests/datastream_validator_tests.test
+++ b/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 {
/**
diff --git a/tests/derivatives.test b/tests/derivatives.test
index e5bee0e5..1b964e37 100644
--- a/tests/derivatives.test
+++ b/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.
*/
diff --git a/tests/includes/datastream_validators.inc b/tests/includes/datastream_validators.inc
index 284519f0..5134339a 100644
--- a/tests/includes/datastream_validators.inc
+++ b/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 {
/**
diff --git a/tests/islandora_derivatives_test.info b/tests/modules/islandora_derivatives_test/islandora_derivatives_test.info
similarity index 100%
rename from tests/islandora_derivatives_test.info
rename to tests/modules/islandora_derivatives_test/islandora_derivatives_test.info
diff --git a/tests/islandora_derivatives_test.module b/tests/modules/islandora_derivatives_test/islandora_derivatives_test.module
similarity index 100%
rename from tests/islandora_derivatives_test.module
rename to tests/modules/islandora_derivatives_test/islandora_derivatives_test.module
diff --git a/tests/islandora_hooked_access_test.info b/tests/modules/islandora_hooked_access_test/islandora_hooked_access_test.info
similarity index 100%
rename from tests/islandora_hooked_access_test.info
rename to tests/modules/islandora_hooked_access_test/islandora_hooked_access_test.info
diff --git a/tests/islandora_hooked_access_test.module b/tests/modules/islandora_hooked_access_test/islandora_hooked_access_test.module
similarity index 100%
rename from tests/islandora_hooked_access_test.module
rename to tests/modules/islandora_hooked_access_test/islandora_hooked_access_test.module
diff --git a/tests/islandora_hooks_test.info b/tests/modules/islandora_hooks_test/islandora_hooks_test.info
similarity index 100%
rename from tests/islandora_hooks_test.info
rename to tests/modules/islandora_hooks_test/islandora_hooks_test.info
diff --git a/tests/islandora_hooks_test.module b/tests/modules/islandora_hooks_test/islandora_hooks_test.module
similarity index 100%
rename from tests/islandora_hooks_test.module
rename to tests/modules/islandora_hooks_test/islandora_hooks_test.module
diff --git a/tests/islandora_ingest_test.info b/tests/modules/islandora_ingest_test/islandora_ingest_test.info
similarity index 100%
rename from tests/islandora_ingest_test.info
rename to tests/modules/islandora_ingest_test/islandora_ingest_test.info
diff --git a/tests/islandora_ingest_test.module b/tests/modules/islandora_ingest_test/islandora_ingest_test.module
similarity index 98%
rename from tests/islandora_ingest_test.module
rename to tests/modules/islandora_ingest_test/islandora_ingest_test.module
index 86281861..412c9a27 100644
--- a/tests/islandora_ingest_test.module
+++ b/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,
),
);
diff --git a/theme/islandora-object-edit.tpl.php b/theme/islandora-object-edit.tpl.php
index a14bcb01..203b8a3b 100644
--- a/theme/islandora-object-edit.tpl.php
+++ b/theme/islandora-object-edit.tpl.php
@@ -17,4 +17,4 @@
* this is the case for all dc elements.
*/
?>
-
+
diff --git a/theme/theme.inc b/theme/theme.inc
index 2748bcd4..058ec8e1 100644
--- a/theme/theme.inc
+++ b/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');