You are here

function xmlsitemap_taxonomy_update_6113 in XML sitemap 6

Implementation of hook_update_N().

File

xmlsitemap_taxonomy/xmlsitemap_taxonomy.install, line 268
Installation file for XML sitemap term.

Code

function xmlsitemap_taxonomy_update_6113() {
  $result = db_query("SELECT name FROM {variable} WHERE name LIKE 'xmlsitemap\\_term\\_%'");
  while ($row = db_fetch_object($result)) {
    $new_name = preg_replace('/_term_/', '_taxonomy_', $row->name);
    $ret[] = update_sql("UPDATE {variable} set name = '{$new_name}' WHERE name LIKE 'xmlsitemap\\_term\\_%'");
  }
  $ret[] = update_sql("UPDATE {xmlsitemap} set module = 'xmlsitemap_taxonomy' WHERE module = 'xmlsitemap_term'");
  $ret[] = update_sql("DELETE FROM {system} WHERE name = 'xmlsitemap_term'");
  return $ret;
}