$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);
$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');
drupal_set_message(filter_xss($msg), 'error');
@ -627,11 +626,11 @@ function islandora_check_object_status(AbstractObject $object_definition) {
* that supports either the give $mimetype or $model will be listed.
* that supports either the give $mimetype or $model will be listed.
*
*
* @param string $variable_id
* @param string $variable_id
* The ID of the Drupal variable to save the viewer settings in
* The ID of the Drupal variable to save the viewer settings in.
* @param string $mimetype
* @param string $mimetype
* The table will be populated with viewers supporting this mimetype
* The table will be populated with viewers supporting this mimetype.
* @param string $model
* @param string $model
* The table will be populated with viewers supporting this content model
* The table will be populated with viewers supporting this content model.
*
*
* @return array
* @return array
* A form api array which defines a themed table to select a viewer.
* A form api array which defines a themed table to select a viewer.
public function __construct($user = NULL, $url = NULL) {
public function __construct($user = NULL, $url = NULL) {
if (!isset($user)) {
if (!isset($user)) {
global $user;
$user = $GLOBALS['user'];;
}
}
if ($user->uid == 0) {
if ($user->uid == 0) {
@ -113,4 +116,5 @@ class IslandoraTuque {
$message = t('Islandora requires the !tuque_url. Please install in /sites/all/libraries/tuque before continuing. See the !islandora_url.', array('!tuque_url' => $tuque_link, '!islandora_url' => $islandora_doc_link));
$message = t('Islandora requires the !tuque_url. Please install in /sites/all/libraries/tuque before continuing. See the !islandora_url.', array('!tuque_url' => $tuque_link, '!islandora_url' => $islandora_doc_link));
$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_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,
'@filter_path' => $filter_path,
));
));
@ -1991,7 +1992,7 @@ function islandora_islandora_datastream_access($op, AbstractDatastream $datastre
* Access for submenu items.
* Access for submenu items.
*
*
* @param string $package_name
* @param string $package_name
* Name of the package
* Name of the package.
*
*
* @return bool
* @return bool
* Access granted
* Access granted
@ -1999,7 +2000,7 @@ function islandora_islandora_datastream_access($op, AbstractDatastream $datastre
* Tests to see if the hooks get called when appropriate.
* Tests to see if the hooks get called when appropriate.
*
*
* In the test module 'islandora_hooks_test' there are implementations
* In the test module 'islandora_hooks_test' there are implementations
@ -10,7 +9,6 @@
*
*
* To make sense of these tests reference islandora_hooks_test.module.
* To make sense of these tests reference islandora_hooks_test.module.
*/
*/
class IslandoraHooksTestCase extends IslandoraWebTestCase {
class IslandoraHooksTestCase extends IslandoraWebTestCase {
/**
/**
@ -256,4 +254,5 @@ class IslandoraHooksTestCase extends IslandoraWebTestCase {
$this->assert($_SESSION['islandora_hooks']['hook'][ISLANDORA_DATASTREAM_INGESTED_HOOK], 'Called ISLANDORA_DATASTREAM_INGESTED_HOOK when ingesting via FedoraObject::ingestDatastream.');
$this->assert($_SESSION['islandora_hooks']['hook'][ISLANDORA_DATASTREAM_INGESTED_HOOK], 'Called ISLANDORA_DATASTREAM_INGESTED_HOOK when ingesting via FedoraObject::ingestDatastream.');
$pass = "Datastream {$this->datastream} contains the appropriate JP2 ending marker.";
$pass = "Datastream {$this->datastream} contains the appropriate JP2 ending marker.";
$fail = "Datastream {$this->datastream} does not contain the appropriate JP2 ending marker. If this is the only JP2 validator that failed, it is likely that derivative generation was interrupted.";
$fail = "Datastream {$this->datastream} does not contain the appropriate JP2 ending marker. If this is the only JP2 validator that failed, it is likely that derivative generation was interrupted.";
$message = $assertion ? $pass : $fail;
$message = $assertion ? $pass : $fail;
$this->addResult($assertion, $message);
$this->addResult($assertion, $message);
}
}
}
}
/**
/**
* Asserts the validity of a PDF datastream.
* Asserts the validity of a PDF datastream.
*/
*/
// @codingStandardsIgnoreLine
class PDFDatastreamValidator extends DatastreamValidator {
class PDFDatastreamValidator extends DatastreamValidator {
$pass = "{$this->datastream} datastream reports the existence of {$pdf_stream_count} PDF streams. Note that an extremely low number could still indicate corruption.";
$pass = "{$this->datastream} datastream reports the existence of {$pdf_stream_count} PDF streams. Note that an extremely low number could still indicate corruption.";
@ -319,17 +326,15 @@ class PDFDatastreamValidator extends DatastreamValidator {
$pass = "{$this->datastream} datastream reports the existence of the closing 'EOF' tag required at the end of PDFs";
$pass = "{$this->datastream} datastream reports the existence of the closing 'EOF' tag required at the end of PDFs";
$fail = "{$this->datastream} datastream does not contain the closing 'EOF' tag. If this is the only PDF validation that failed, it is likely that derivative generation was interrupted.";
$fail = "{$this->datastream} datastream does not contain the closing 'EOF' tag. If this is the only PDF validation that failed, it is likely that derivative generation was interrupted.";
$message = $assertion ? $pass : $fail;
$message = $assertion ? $pass : $fail;
$this->addResult($assertion, $message);
$this->addResult($assertion, $message);
}
}
}
}
/**
/**
@ -339,7 +344,9 @@ class PDFDatastreamValidator extends DatastreamValidator {
* is the string we're looking to find in the datastream, and the second is an
* 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.
* integer representing the number of times it should appear in the datastream.
*/
*/
// @codingStandardsIgnoreLine
class TextDatastreamValidator extends DatastreamValidator {
class TextDatastreamValidator extends DatastreamValidator {
/**
/**
* Constructor override; blow up if we don't have our two values.
* Constructor override; blow up if we don't have our two values.
*/
*/
@ -369,6 +376,7 @@ class TextDatastreamValidator extends DatastreamValidator {