You are here

function support_update_7000 in Support Ticketing System 7

Convert support mail variables to HTML.

File

./support.install, line 592
Install, update and uninstall functions for the ._support module.

Code

function support_update_7000() {

  // Note: Other modules have to fix up their own variables.
  $vars = array(
    'support_mail_ticket_comment_new_body',
    'support_mail_ticket_comment_new_subject',
    'support_mail_ticket_deny_body',
    'support_mail_ticket_deny_subject',
    'support_mail_ticket_new_body',
    'support_mail_ticket_new_subject',
  );
  foreach ($vars as $var) {
    $fixed = str_replace(array(
      "\r\n",
      "\n\r",
      "\n",
      "\r",
    ), "<br />\n", variable_get($var, ''));
    if (!empty($fixed)) {
      variable_set($var, $fixed);
    }
  }
}