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']);
}
else {
if (!isset($_SESSION['islandora_derivative_messages'])) {
$_SESSION['islandora_derivative_messages'] = array();
if (!isset($_SESSION['islandora_event_messages'])) {
$_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())),
'severity' => 'status',
);

6
includes/utilities.inc

@ -933,12 +933,12 @@ function islandora_sanitize_input_for_valid_xml($input, $replacement = '') {
*/
function islandora_event_status() {
$results = FALSE;
if (isset($_SESSION['islandora_derivative_messages'])) {
foreach ($_SESSION['islandora_derivative_messages'] as $message) {
if (isset($_SESSION['islandora_event_messages'])) {
foreach ($_SESSION['islandora_event_messages'] as $message) {
drupal_set_message($message['message'], $message['severity']);
$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.');
return array('#markup' => $text);

Loading…
Cancel
Save