diff --git a/CollectionClass.inc b/CollectionClass.inc
index 6c5fd8f5..96eca6f0 100644
--- a/CollectionClass.inc
+++ b/CollectionClass.inc
@@ -343,7 +343,7 @@ class CollectionClass {
$thisClass = new $phpClass ();
$returnValue = $thisClass->$phpMethod($parametersArray, $dsid, $file, $file_ext);
if (!$returnValue) {
- drupal_set_message('Error! Failed running content model method !m !rv', array('!m' => $phpMethod, '!rv' => $returnValue));
+ drupal_set_message(t('Error! Failed running content model method !m !rv', array('!m' => $phpMethod, '!rv' => $returnValue)));
return FALSE;
}
}
@@ -463,7 +463,7 @@ class CollectionClass {
module_load_include('inc', 'fedora_repository', 'plugins/PersonalCollectionClass');
$personalCollectionClass = new PersonalCollectionClass();
if (!$personalCollectionClass->createCollection($user, $pid, $soapClient)) {
- drupal_set_message("Did not create a personal collection object for !u", array('!u' => $user->name));
+ drupal_set_message(t("Did not create a personal collection object for !u", array('!u' => $user->name)));
return FALSE; //creation failed don't save the collection pid in drupal db
}
user_save($user, $personal_collection_pid);
diff --git a/ObjectHelper.inc b/ObjectHelper.inc
index 313d2159..8f58a3ab 100644
--- a/ObjectHelper.inc
+++ b/ObjectHelper.inc
@@ -963,7 +963,7 @@ class ObjectHelper {
}
else {
- $breadcrumbs[] = l("Path Calculation Error", 'fedora/repository/' . $pid);
+ $breadcrumbs[] = l(t("Path Calculation Error"), 'fedora/repository/' . $pid);
}
}
}
diff --git a/SecurityClass.inc b/SecurityClass.inc
index 55a6ebb4..970b108b 100644
--- a/SecurityClass.inc
+++ b/SecurityClass.inc
@@ -71,9 +71,9 @@ class SecurityClass {
try {
$xml = new SimpleXMLElement($policyStream);
} catch (Exception $e) {
- watchdog(t("Fedora_Repository"), t("No roles found in security policy, could not parse policy stream."), NULL, WATCHDOG_ERROR);
+ watchdog(t("Fedora_Repository"), "No roles found in security policy, could not parse policy stream.", NULL, WATCHDOG_ERROR);
//we may not want to send this to the screen.
- drupal_set_message(t('No roles found in security policy, could not parse policy stream: !message', array('!message' => $e->getMessage())), 'error');
+ drupal_set_message(t('No roles found in security policy, could not parse policy stream: !message', array('!message' => check_plain($e->getMessage()))), 'error');
return NULL;
}
$xml->registerXPathNamespace('default', 'urn:oasis:names:tc:xacml:1.0:policy');
@@ -110,7 +110,7 @@ class SecurityClass {
try {
$doc->load(drupal_get_path('module', 'Fedora_Repository') . '/policies/noObjectEditPolicy.xml');
} catch (exception $e) {
- watchdog(t("Fedora_Repository"), t("Problem loading policy file."), NULL, WATCHDOG_ERROR);
+ watchdog(t("Fedora_Repository"), "Problem loading policy file.", NULL, WATCHDOG_ERROR);
}
$conditions = $doc->getElementsByTagName('Condition');
foreach ($conditions as $condition) {
diff --git a/fedora_repository.module b/fedora_repository.module
index 00201ec9..aaad2c4c 100644
--- a/fedora_repository.module
+++ b/fedora_repository.module
@@ -143,7 +143,7 @@ function fedora_repository_ingest_object($collection_pid=NULL, $collection_label
function fedora_repository_ingest_form_submit(array $form, array &$form_state) {
//only validate the form if the submit button was pressed (other buttons may be used for AHAH
if ($form_state['ahah_submission']) {
- $form_state['submitted'] = false;
+ $form_state['submitted'] = FALSE;
return;
}
if ($form_state['storage']['xml']) {
@@ -202,7 +202,7 @@ function fedora_repository_ingest_form_submit(array $form, array &$form_state) {
function fedora_repository_ingest_form_validate($form, &$form_state) {
//only validate the form if the submit button was pressed (other buttons may be used for AHAH
if ($form_state['ahah_submission']) {
- $form_state['submitted'] = false;
+ $form_state['submitted'] = FALSE;
return;
}
if ($form_state['clicked_button']['#id'] == 'edit-submit' && $form_state['ahah_submission'] != 1) {
@@ -246,8 +246,11 @@ function fedora_repository_ingest_form_validate($form, &$form_state) {
if (!empty($file)) {
if (!in_array($dformat, $allowedMimeTypes)) {
- form_set_error('ingest-file-location', t('The uploaded file\'s mimetype (' . $dformat . ') is not associated with this Content Model. The allowed types are ' .
- implode(' ', $allowedMimeTypes)));
+ form_set_error('ingest-file-location',
+ t('The uploaded file\'s mimetype') .
+ ' (' . $dformat . ') ' .
+ t('is not associated with this Content Model. The allowed types are') .
+ ' ' . implode(' ', $allowedMimeTypes));
file_delete($file);
return;
}
@@ -505,7 +508,7 @@ function fedora_repository_purge_object_form_validate($form, &$form_state) {
foreach ($contentModels as $contentModel) {
if ($contentModel->pid == 'islandora:collectionCModel') {
$member_pids = get_related_items_as_array($pid, 'isMemberOfCollection');
- if (is_array($member_pids) && ! empty($member_pids)){
+ if (is_array($member_pids) && ! empty($member_pids)) {
form_set_error('new_collection_pid', t("Please purge all members of this collection before deleting the collection itself."));
return;
}
diff --git a/fedora_repository.solutionpacks.inc b/fedora_repository.solutionpacks.inc
index fb09528d..756f8bf0 100644
--- a/fedora_repository.solutionpacks.inc
+++ b/fedora_repository.solutionpacks.inc
@@ -181,7 +181,7 @@ function solution_pack_add_form($form_name, $form_xml) {
$object->name = $form_name;
$object->form = $form_xml;
$result = drupal_write_record('xml_forms', $object);
- drupal_set_message("Added $name");
+ drupal_set_message(t("Added @name", array("@name" => $name)));
}
}
@@ -196,7 +196,7 @@ function solution_pack_add_form_association($content_model, $form_name) {
$object->title_field = "['titleInfo']['title']";
$object->transform = 'mods_to_dc.xsl';
$result = drupal_write_record('islandora_content_model_forms', $object);
- drupal_set_message("Added association between $content_model$name");
+ drupal_set_message(t("Added association between @cm@name", array("@cm" => $content_model, "@name"=>$name)));
}
}
diff --git a/formClass.inc b/formClass.inc
index be5ef9d2..1c8d2f84 100644
--- a/formClass.inc
+++ b/formClass.inc
@@ -498,7 +498,7 @@ class formClass {
'#title' => t('Content models available'),
'#options' => $potential_models,
'#default_value' => $selected_model,
- '#description' => t('Content models define datastream composition, relationships between this and other content models, and the mandatory behaviors associated with each digital object.
Additional information may be found here. '),
+ '#description' => t('Content models define datastream composition, relationships between this and other content models, and the mandatory behaviors associated with each digital object.
Additional information may be found here.'),
),
),
'collection_pid' => array(
diff --git a/plugins/FormBuilder.inc b/plugins/FormBuilder.inc
index cd9dc4a9..715ca6af 100644
--- a/plugins/FormBuilder.inc
+++ b/plugins/FormBuilder.inc
@@ -95,7 +95,7 @@ class FormBuilder {
try {
$xml = new SimpleXMLElement($policyStreamDoc);
} catch (Exception $e) {
- watchdog(t("Fedora_Repository"), t("Problem getting security policy."), NULL, WATCHDOG_ERROR);
+ watchdog(t("Fedora_Repository"), "Problem getting security policy.", NULL, WATCHDOG_ERROR);
drupal_set_message(t('Problem getting security policy: @e', array('@e' => check_plain($e->getMessage()))), 'error');
return FALSE;
}
@@ -173,7 +173,7 @@ class FormBuilder {
$object = Fedora_Item::ingest_from_FOXML($dom);
if (!empty($object->pid)) {
// drupal_set_message("Item ". l($object->pid, 'fedora/repository/'. $object->pid) . " created successfully.", "status");
- drupal_set_message(t("Item !pid created successfully.", array('!pid' => l($object->pid, 'fedora/repository/' . $object->pid))), "status");
+ drupal_set_message(t("Item !pid created successfully.", array('!pid' => l(check_plain($object->pid), 'fedora/repository/' . check_plain($object->pid)))), "status");
}
if (!empty($_SESSION['fedora_ingest_files'])) {
foreach ($_SESSION['fedora_ingest_files'] as $dsid => $createdFile) {
diff --git a/plugins/PersonalCollectionClass.inc b/plugins/PersonalCollectionClass.inc
index 29c76cfa..9ed6af07 100644
--- a/plugins/PersonalCollectionClass.inc
+++ b/plugins/PersonalCollectionClass.inc
@@ -75,7 +75,7 @@ class PersonalCollectionClass {
try {
$xml = new SimpleXMLElement($collectionTemplate);
} catch (Exception $e) {
- watchdog(t("Fedora_Repository"), t("Problem creating personal collection policy, could not parse collection policy stream."), NULL, WATCHDOG_ERROR);
+ watchdog(t("Fedora_Repository"), "Problem creating personal collection policy, could not parse collection policy stream.", NULL, WATCHDOG_ERROR);
drupal_set_message(t('Problem creating personal collection policy, could not parse collection policy stream: @e', array('@e' => check_plain($e->getMessage()))), 'error');
return FALSE;
}
diff --git a/plugins/Refworks.inc b/plugins/Refworks.inc
index 5e39b3c2..2c86caa7 100644
--- a/plugins/Refworks.inc
+++ b/plugins/Refworks.inc
@@ -83,7 +83,7 @@ class Refworks {
//$dom = dom_import_simplexml($xml);//test to see if it behaves better
//$xml = new SimpleXMLElement(trim(file_get_contents($file)));
} catch (Exception $e) {
- drupal_set_message(t('Error processing Refworks file:') . " " . $e->getMessage());
+ drupal_set_message(t('Error processing Refworks file: @message', array('@message' => $e->getMessage())));
return FALSE;
}
$this->referenceList = array();
@@ -296,7 +296,7 @@ class Refworks {
$object = $client->__soapCall('ingest', array(
$params
));
- watchdog(t("FEDORA_REPOSITORY"), t("Successfully added repository item !pid - !it", array('!pid' => $pid, '!it' => $item_title)), NULL, WATCHDOG_INFO);
+ watchdog(t("FEDORA_REPOSITORY"), "Successfully added repository item " . $pid . " - ". $item_title, NULL, WATCHDOG_INFO);
$deleteFiles = $form_values['delete_file']; //remove files from drupal file system
if ($deleteFiles > 0) {
diff --git a/plugins/ShowStreamsInFieldSets.inc b/plugins/ShowStreamsInFieldSets.inc
index a6e7eaad..9e20ca5a 100644
--- a/plugins/ShowStreamsInFieldSets.inc
+++ b/plugins/ShowStreamsInFieldSets.inc
@@ -109,7 +109,7 @@ class ShowStreamsInFieldSets {
}
$dc_html = $objectHelper->getFormattedDC($item);
- $dl_link = l('