Browse Source

Rename session array to be more generic

pull/421/head
mitchmac 11 years ago
parent
commit
1f6d4f56ff
  1. 6
      includes/derivatives.inc
  2. 6
      includes/utilities.inc

6
includes/derivatives.inc

@ -100,10 +100,10 @@ function islandora_derivative_logging(array $logging_results) {
drupal_set_message(filter_xss(format_string($message['message'], isset($message['message_sub']) ? $message['message_sub'] : array())), $message['severity']); drupal_set_message(filter_xss(format_string($message['message'], isset($message['message_sub']) ? $message['message_sub'] : array())), $message['severity']);
} }
else { else {
if (!isset($_SESSION['islandora_derivative_messages'])) { if (!isset($_SESSION['islandora_event_messages'])) {
$_SESSION['islandora_derivative_messages'] = array(); $_SESSION['islandora_event_messages'] = array();
} }
$_SESSION['islandora_derivative_messages'][] = array( $_SESSION['islandora_event_messages'][] = array(
'message' => filter_xss(format_string($message['message'], isset($message['message_sub']) ? $message['message_sub'] : array())), 'message' => filter_xss(format_string($message['message'], isset($message['message_sub']) ? $message['message_sub'] : array())),
'severity' => 'status', 'severity' => 'status',
); );

6
includes/utilities.inc

@ -933,12 +933,12 @@ function islandora_sanitize_input_for_valid_xml($input, $replacement = '') {
*/ */
function islandora_event_status() { function islandora_event_status() {
$results = FALSE; $results = FALSE;
if (isset($_SESSION['islandora_derivative_messages'])) { if (isset($_SESSION['islandora_event_messages'])) {
foreach ($_SESSION['islandora_derivative_messages'] as $message) { foreach ($_SESSION['islandora_event_messages'] as $message) {
drupal_set_message($message['message'], $message['severity']); drupal_set_message($message['message'], $message['severity']);
$results = TRUE; $results = TRUE;
} }
unset($_SESSION['islandora_derivative_messages']); unset($_SESSION['islandora_event_messages']);
} }
$text = ($results) ? t('The status messages above will be deleted after viewing this page.') : t('No messages to display.'); $text = ($results) ? t('The status messages above will be deleted after viewing this page.') : t('No messages to display.');
return array('#markup' => $text); return array('#markup' => $text);

Loading…
Cancel
Save