You are here

function nodewords_update_6146 in Nodewords: D6 Meta Tags 6

Same name and namespace in other branches
  1. 6.2 nodewords.install \nodewords_update_6146()

Implements hook_update_N().

File

./nodewords.install, line 907
Installation file for nodewords.module.

Code

function nodewords_update_6146() {
  $ret = array();
  drupal_load('module', 'nodewords');
  $content = db_result(db_query("SELECT content FROM {nodewords} WHERE type = '%s' AND id = '' AND name = 'robots'", NODEWORDS_TYPE_PAGER));
  if ($content !== FALSE) {
    variable_set('nodewords_list_robots', unserialize($content));
    $ret[] = array(
      'success' => TRUE,
      'query' => 'The previous value for the meta tag ROBOTS used in list pages has been restored; check if it is the desired value',
    );
  }
  $ret[] = update_sql("DELETE FROM {nodewords} WHERE type = '" . NODEWORDS_TYPE_PAGER . "'");
  return $ret;
}