You are here

function glossary_update_6101 in Glossary 6

Implementation of hook_update_N(). Allow code and pre to be configurable (#241377).

File

./glossary.install, line 41
Glossary module installation functions.

Code

function glossary_update_6101() {
  $ret = array();
  $result = db_query('SELECT format, name FROM {filter_formats}');
  while ($filter = db_fetch_array($result)) {
    $format = $filter['format'];
    $value = variable_get("glossary_blocking_tags_{$format}", NULL);
    if (!is_null($value)) {
      $value = "code pre {$value}";
      variable_set("glossary_blocking_tags_{$format}", $value);
      $ret[] = array(
        'success' => TRUE,
        'query' => "variable_set('glossary_blocking_tags_{$format}', {$value})",
      );
    }
  }
  return $ret;
}