You are here

nodewords.install in Nodewords: D6 Meta Tags 6

Same filename and directory in other branches
  1. 5 nodewords.install
  2. 6.3 nodewords.install
  3. 6.2 nodewords.install

Installation file for nodewords.module.

File

nodewords.install
View source
<?php

/**
 * @file
 * Installation file for nodewords.module.
 */

/**
 * Implements hook_requirements().
 */
function nodewords_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime') {
    drupal_load('module', 'nodewords');
    if (!count(nodewords_get_possible_tags())) {
      if (!count(module_implements('nodewords_tags_info'))) {
        $requirements['nodewords'] = array(
          'title' => t('Nodewords'),
          'description' => t('There are no modules enabled that implement meta tags.'),
          'severity' => REQUIREMENT_ERROR,
          'value' => t('Enable at least one module listed under the <em>Meta tags</em> category on the <a href="@modules-page">modules page</a>.', array(
            '@modules-page' => url('admin/build/modules'),
          )),
        );
      }
      else {
        $requirements['nodewords'] = array(
          'title' => t('Nodewords'),
          'description' => t('There are no modules that support the current API version.'),
          'severity' => REQUIREMENT_ERROR,
          'value' => t('There should be at least one module that supports the current API version. Verify you correctly copied the files in the server.'),
        );
      }
    }
    elseif (module_exists('nodewords_bypath')) {
      $requirements['nodewords'] = array(
        'title' => t('Nodewords'),
        'description' => t('The feature implemented in <q>Meta Tags by Path</q> is now included in Nodewords; there is not need to use <q>Meta Tags by Path</q>, and the module should be disabled to avoid possible conflicts.'),
        'severity' => REQUIREMENT_ERROR,
        'value' => t('Disable the module in the<a href="@url">modules page</a>.', array(
          '@url' => url('admin/build/modules'),
        )),
      );
    }
  }
  return $requirements;
}

/**
 * Implements hook_schema().
 */
function nodewords_schema() {
  $schema = array();
  $schema['nodewords'] = array(
    'description' => 'The table containing the meta tag values for all the pages.',
    'fields' => array(
      'mtid' => array(
        'description' => 'The primary key.',
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'type' => array(
        'description' => 'The type of object to which the meta tag refers (node, user, page, etc...).',
        'type' => 'int',
        'size' => 'small',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'id' => array(
        'description' => 'The object ID.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'name' => array(
        'description' => 'The meta tag name.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ),
      'content' => array(
        'description' => 'The content of the meta tag.',
        'type' => 'text',
        'size' => 'big',
        'not null' => TRUE,
      ),
    ),
    'indexes' => array(
      'nodewords_name' => array(
        array(
          'name',
          6,
        ),
      ),
      'nodewords_type_id' => array(
        'type',
        'id',
      ),
    ),
    'unique keys' => array(
      'nodewords_type_id_name' => array(
        'type',
        'id',
        'name',
      ),
    ),
    'primary key' => array(
      'mtid',
    ),
  );
  $schema['nodewords_custom'] = array(
    'description' => 'The table containing data for custom pages.',
    'fields' => array(
      'pid' => array(
        'description' => 'The primary key.',
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'name' => array(
        'description' => 'The page name as shown in the list of custom pages.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ),
      'path' => array(
        'description' => 'The page path.',
        'type' => 'text',
        'size' => 'medium',
        'not null' => TRUE,
      ),
      'weight' => array(
        'description' => 'The weight of the page.',
        'type' => 'int',
        'size' => 'small',
        'not null' => TRUE,
        'default' => 0,
      ),
      'enabled' => array(
        'description' => 'A flag set when the page is enabled.',
        'type' => 'int',
        'size' => 'small',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 1,
      ),
    ),
    'primary key' => array(
      'pid',
    ),
  );
  return $schema;
}

/**
 * Implements hook_install().
 */
function nodewords_install() {
  drupal_install_schema('nodewords');
  db_query("UPDATE {system} SET weight = 10 WHERE name = 'nodewords' AND type = 'module'");
  drupal_set_message(t('The Nodewords module has been installed. Now you can <a href="@settings-page">configure it</a>, after you have enabled at least one module implementing meta tags.', array(
    '@settings-page' => url('admin/content/nodewords'),
  )));
}

/**
 * Implements hook_uninstall().
 */
function nodewords_uninstall() {
  drupal_uninstall_schema('nodewords');
  variable_del('nodewords');
  variable_del('nodewords-repeat');
  variable_del('nodewords-use_front');
  variable_del('nodewords_base_url');
  variable_del('nodewords_metatags_generation_method');
  variable_del('nodewords_metatags_generation_source');
  variable_del('nodewords_collapse_fieldset');
  variable_del('nodewords_edit');
  variable_del('nodewords_enable_user_metatags');
  variable_del('nodewords_global');
  variable_del('nodewords_global_keywords');
  variable_del('nodewords_keyword_vids');
  variable_del('nodewords_list_repeat');
  variable_del('nodewords_list_robots');
  variable_del('nodewords_max_size');
  variable_del('nodewords_update_6113');
  variable_del('nodewords_update_6139');
  variable_del('nodewords_update_6145');
  variable_del('nodewords_update_6147');
  variable_del('nodewords_update_6156');
  variable_del('nodewords_update_6159');
  variable_del('nodewords_update_6162');
  variable_del('nodewords_update_6163');
  variable_del('nodewords_update_6164');
  variable_del('nodewords_update_6166');
  variable_del('nodewords_use_alt_attribute');
  variable_del('nodewords_use_frontpage_tags');
  variable_del('nodewords_use_path_alias');
  variable_del('nodewords_use_teaser');
  $node_types = array_keys(node_get_types('names'));
  $variables = array(
    'nodewords_metatags_generation_method_',
    'nodewords_metatags_generation_source_',
    'nodewords_edit_metatags_',
    'nodewords_filter_modules_output_',
    'nodewords_filter_regexp_',
    'nodewords_use_alt_attribute_',
    'nodewords_use_teaser_',
  );
  foreach ($node_types as $node_type) {
    foreach ($variables as $variable) {
      variable_del($variable . $node_type);
    }
  }
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6100() {
  $tags = array(
    'abstract' => 'abstract',
    'copyright' => 'copyright',
    'description' => 'description',
    'geourl' => 'location',
    'keywords' => 'keywords',
    'Revisit-After' => 'revisit-after',
    'robots' => 'robots',
  );
  $ret = array();
  db_change_field($ret, 'nodewords', 'content', 'content', array(
    'type' => 'text',
    'size' => 'big',
    'not null' => TRUE,
  ));
  $settings = variable_get('nodewords', array());

  // Create the new Drupal variables used for the settings.
  if (isset($settings['global'])) {
    variable_set('nodewords_global', $settings['global']);
  }
  if (!empty($settings['use_teaser'])) {
    variable_set('nodewords_basic_use_teaser', $settings['use_teaser']);
  }
  if (isset($settings['taxonomy']['keyword_vids'])) {
    variable_set('nodewords_keyword_vids', $settings['taxonomy']['keyword_vids']);
  }
  if (isset($settings['edit'])) {
    $new_tags = array();
    foreach ($tags as $old_tag => $new_tag) {
      if (!empty($settings['edit'][$old_tag])) {
        $new_tags[$new_tag] = $new_tag;
      }
    }
    variable_set('nodewords_edit', $new_tags);
  }
  if (isset($settings['head'])) {
    $new_tags = array();
    foreach ($tags as $old_tag => $new_tag) {
      if (!empty($settings['head'][$old_tag])) {
        $new_tags[$new_tag] = $new_tag;
      }
    }
    variable_set('nodewords_head', $new_tags);
  }
  if (!empty($settings['advanced']['enable_user_metatags'])) {
    variable_set('nodewords_enable_user_metatags', $settings['advanced']['enable_user_metatags']);
  }
  if (!empty($settings['advanced']['repeat'])) {
    variable_set('nodewords_list_repeat', $settings['advanced']['repeat']);
  }
  if (!empty($settings['advanced']['use_front_page_tags'])) {
    variable_set('nodewords_use_frontpage_tags', $settings['advanced']['use_front_page_tags']);
  }
  if (!empty($settings['advanced']['max_size'])) {
    variable_set('nodewords_max_size', $settings['advanced']['max_size']);
  }
  if (!empty($settings['advanced']['use_alt_tags'])) {
    variable_set('nodewords_use_alt_attribute', $settings['advanced']['use_alt_tags']);
  }

  // Delete the old Drupal variable used.
  $ret[] = array(
    'success' => TRUE,
    'query' => 'Created new setting variables',
  );
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6102() {
  $metatags = array();
  $ret = array();
  $settings = variable_get('nodewords_global', array());
  drupal_load('module', 'nodewords');
  if (empty($settings['geourl'])) {
    $coordinates = array(
      0,
      0,
    );
  }
  else {
    $coordinates = array_map('trim', explode(',', $settings['geourl']));
    $coordinates[] = 0;
    $coordinates[] = 0;
    $coordinates = array_splice($coordinates, 0, 2);
  }
  $metatags['copyright'] = empty($settings['copyright']) ? '' : $settings['copyright'];
  $metatags['geourl'] = $coordinates[0] . ',' . $coordinates[1];
  $metatags['keywords'] = empty($settings['keywords']) ? '' : nodewords_unique_values($settings['keywords']);
  $metatags['robots'] = empty($settings['robots']) ? '' : $settings['robots'];
  foreach ($metatags as $name => $content) {
    $result = db_result(db_query("SELECT 1 FROM {nodewords} WHERE type = 'default' AND id = '' AND name = '%s'", $name));
    if ($result) {
      $ret[] = update_sql("UPDATE {nodewords} SET content = '" . db_escape_string($content) . "' WHERE type = 'default' AND id = '' AND name = '" . db_escape_string($name) . "'");
    }
    else {
      $ret[] = update_sql("INSERT INTO {nodewords} (type, id, name, content) VALUES ('default', '', '" . db_escape_string($name) . "', '" . db_escape_string($content) . "')");
    }
  }
  $ret[] = array(
    'success' => TRUE,
    'query' => check_plain('The default meta tags values have been updated; verify they have the correct values at ' . url('admin/content/nodewords/meta-tags/default', array(
      'absolute' => TRUE,
    ))),
  );
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6103() {
  $ret = array();
  $ret[] = update_sql("UPDATE {nodewords} SET name = 'revisit-after' WHERE name = 'Revisit-After'");
  $ret[] = update_sql("UPDATE {nodewords} SET name = 'dc.title' WHERE name = 'DC.Title'");
  $ret[] = update_sql("UPDATE {nodewords} SET type = 'frontpage' WHERE type = 'page' AND id = ''");
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6104() {
  $ret = array();
  $head_tags = variable_get('nodewords_head', array());
  array_change_key_case($head_tags);
  if (isset($head_tags['geourl'])) {
    $head_tags['location'] = $head_tags['geourl'];
    unset($head_tags['geourl']);
  }
  variable_set('nodewords_head', $head_tags);
  $edit_tags = variable_get('nodewords_edit', array());
  if (isset($edit_tags['geourl'])) {
    $edit_tags['location'] = $edit_tags['geourl'];
    unset($edit_tags['geourl']);
    variable_set('nodewords_edit', $edit_tags);
  }
  $ret[] = array(
    'success' => TRUE,
    'query' => 'Updated the module settings',
  );
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6106() {
  $ret = array();
  $ret[] = update_sql("UPDATE {nodewords} SET name = 'location' WHERE name = 'geourl'");
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6113(&$sandbox) {
  $ret = array();
  if (!isset($sandbox['progress'])) {
    if (db_table_exists('nodewords_tmp')) {
      db_drop_table($ret, 'nodewords_tmp');
    }
    db_rename_table($ret, 'nodewords', 'nodewords_tmp');
    $sandbox['progress'] = 0;
    $sandbox['max'] = db_result(db_query("SELECT COUNT(*) FROM {nodewords_tmp}"));
    $schema['nodewords'] = array(
      'fields' => array(
        'mtid' => array(
          'type' => 'serial',
          'not null' => TRUE,
        ),
        'type' => array(
          'type' => 'varchar',
          'length' => 16,
          'not null' => TRUE,
          'default' => '',
        ),
        'id' => array(
          'type' => 'varchar',
          'length' => 255,
          'not null' => TRUE,
          'default' => '',
        ),
        'name' => array(
          'type' => 'varchar',
          'length' => 32,
          'not null' => TRUE,
          'default' => '',
        ),
        'content' => array(
          'type' => 'text',
          'size' => 'big',
          'not null' => TRUE,
        ),
      ),
      'indexes' => array(
        'nodewords_id' => array(
          array(
            'id',
            6,
          ),
        ),
        'nodewords_type' => array(
          array(
            'type',
            6,
          ),
        ),
      ),
      'unique keys' => array(
        'tin' => array(
          'type',
          'id',
          'name',
        ),
      ),
      'primary key' => array(
        'mtid',
      ),
    );
    db_create_table($ret, 'nodewords', $schema['nodewords']);
  }
  if ($sandbox['max']) {
    $metatags = db_query_range("SELECT * FROM {nodewords_tmp}", $sandbox['progress'], 10);
    while ($metatag = db_fetch_object($metatags)) {
      switch ($metatag->name) {
        case 'location':
          if (empty($metatag->content)) {
            $metatag->content = serialize(array(
              'latitude' => 0,
              'longitude' => 0,
            ));
          }
          else {
            $coordinates = array_map('trim', explode(',', $metatag->content));
            $coordinates[] = 0;
            $coordinates[] = 0;
            $coordinates = array_splice($coordinates, 0, 2);
            $metatag->content = serialize(array(
              'latitude' => $coordinates[0],
              'longitude' => $coordinates[1],
            ));
          }
          break;
        case 'robots':
          if (empty($metatag->content)) {
            $metatag->content = serialize(array(
              'value' => array(),
            ));
          }
          else {
            $content = array_map('trim', explode(',', $metatag->content));
            $new_content = array(
              'noarchive' => 0,
              'nofollow' => in_array('nofollow', $content) ? 'nofollow' : 0,
              'noindex' => in_array('noindex', $content) ? 'noindex' : 0,
              'noodp' => 0,
              'nosnippet' => 0,
              'noydir' => 0,
            );
            $metatag->content = serialize($new_content);
          }
          break;
      }
      db_query("INSERT INTO {nodewords} (type, id, name, content) VALUES ('%s', '%s', '%s', '%s')", $metatag->type, $metatag->id, $metatag->name, $metatag->content);
      $sandbox['progress']++;
    }
  }
  $ret['#finished'] = empty($sandbox['max']) ? 1 : $sandbox['progress'] / $sandbox['max'];
  if ($ret['#finished'] == 1) {
    db_drop_table($ret, 'nodewords_tmp');
    variable_set('nodewords_update_6113', TRUE);
  }
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6115() {
  $ret = array();
  if (db_column_exists('nodewords', 'weight')) {
    db_drop_field($ret, 'nodewords', 'weight');
  }
  if (!db_table_exists('nodewords_custom')) {
    db_create_table($ret, 'nodewords_custom', array(
      'fields' => array(
        'pid' => array(
          'type' => 'serial',
          'not null' => TRUE,
        ),
        'path' => array(
          'type' => 'varchar',
          'length' => 255,
          'not null' => TRUE,
          'default' => '',
        ),
        'weight' => array(
          'type' => 'int',
          'size' => 'small',
          'not null' => TRUE,
          'default' => 0,
        ),
        'enabled' => array(
          'type' => 'int',
          'size' => 'small',
          'not null' => TRUE,
          'default' => 1,
        ),
      ),
      'primary key' => array(
        'pid',
      ),
      'unique keys' => array(
        'path' => array(
          'path',
        ),
      ),
    ));
  }
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6117() {
  $ret[] = update_sql("DELETE FROM {nodewords} WHERE type IN ('views', 'panels')");
  if (db_affected_rows()) {
    $ret[] = array(
      'success' => TRUE,
      'query' => check_plain('The support for Views, and Panels have been changed; visit ' . url('admin/content/nodewords/meta-tags/other', array(
        'absolute' => TRUE,
      )) . ' to edit the meta tags for those pages'),
    );
  }
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6120() {
  $ret = array();
  db_drop_unique_key($ret, 'nodewords', 'tin');
  db_change_field($ret, 'nodewords', 'type', 'type', array(
    'type' => 'varchar',
    'length' => 16,
    'not null' => TRUE,
    'default' => '',
  ));
  db_change_field($ret, 'nodewords', 'id', 'id', array(
    'type' => 'varchar',
    'length' => 255,
    'not null' => TRUE,
    'default' => '',
  ));
  db_change_field($ret, 'nodewords', 'name', 'name', array(
    'type' => 'varchar',
    'length' => 32,
    'not null' => TRUE,
    'default' => '',
  ));
  db_add_unique_key($ret, 'nodewords', 'tin', array(
    'type',
    'id',
    'name',
  ));
  db_drop_unique_key($ret, 'nodewords_custom', 'path');
  db_change_field($ret, 'nodewords_custom', 'path', 'path', array(
    'type' => 'varchar',
    'length' => 255,
    'not null' => TRUE,
    'default' => '',
  ));
  db_add_unique_key($ret, 'nodewords_custom', 'path', array(
    'path',
  ));
  db_change_field($ret, 'nodewords_custom', 'weight', 'weight', array(
    'type' => 'int',
    'size' => 'small',
    'not null' => TRUE,
    'default' => 0,
  ));
  if (!db_column_exists('nodewords_custom', 'enabled')) {
    db_add_field($ret, 'nodewords_custom', 'enabled', array(
      'type' => 'int',
      'size' => 'small',
      'not null' => TRUE,
      'default' => 1,
    ));
  }
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6122() {
  $ret = array();
  $ret[] = update_sql("UPDATE {nodewords_custom} SET weight = 10 WHERE weight > 10");
  $ret[] = update_sql("UPDATE {nodewords_custom} SET weight = -10 WHERE weight < -10");
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6128() {
  $ret = array();
  $ret[] = update_sql("DELETE FROM {nodewords} WHERE type = 'offline'");
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6131() {
  $result = db_query("SELECT name FROM {variable} WHERE name LIKE 'basic\\_metatags\\_%'");
  $ret = array();
  while ($row = db_fetch_object($result)) {
    $value = variable_get($row->name, NULL);
    if (isset($value)) {
      variable_set(str_replace('basic_metatags_', 'nodewords_basic', $row->name), $value);
      variable_del($row->name);
    }
  }
  $ret[] = array(
    'success' => TRUE,
    'query' => 'Updated the module settings',
  );
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6135() {
  $ret = array();
  if (db_table_exists('cache_nodewords')) {
    db_drop_table($ret, 'cache_nodewords');
  }
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6136() {
  $ret = array();
  if (module_exists('nodewords')) {
    $tags = array(
      'nodewords_basic' => array(
        'abstract',
        'canonical',
        'copyright',
        'description',
        'keywords',
        'revisit-after',
        'robots',
      ),
      'nodewords_extra' => array(
        'dc.contributor',
        'dc.creator',
        'dc.date',
        'dc.publisher',
        'dc.title',
        'geourl',
        'location',
        'pics-label',
      ),
      'nodewords_verification_tags' => array(
        'bing_webmaster_center',
        'google_webmaster_tools',
        'yahoo_site_explorer',
      ),
    );
    foreach ($tags as $module => $module_tags) {
      $bool = db_result(db_query("SELECT COUNT(*) FROM {nodewords} WHERE name IN (" . db_placeholders($module_tags, 'varchar') . ")", $module_tags));
      if ($bool) {
        module_enable(array(
          $module,
        ));
        $ret[] = array(
          'success' => TRUE,
          'query' => "UPDATE {system} SET status = 1 WHERE type = 'module' AND name = '{$module}'",
        );
      }
    }
  }
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6137() {
  $ret = array();
  if (!variable_get('nodewords_update_6113', FALSE)) {
    db_add_index($ret, 'nodewords', 'nodewords_id', array(
      array(
        'id',
        6,
      ),
    ));
    db_add_index($ret, 'nodewords', 'nodewords_type', array(
      array(
        'type',
        6,
      ),
    ));
  }
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6140() {
  $node_types = array_keys(node_get_types('names'));
  $ret = array();
  foreach ($node_types as $node_type) {
    $value = variable_get('nodewords_basic_user_teaser_' . $node_type, NULL);
    if (isset($value)) {
      variable_set('nodewords_basic_use_teaser_' . $node_type, $value);
    }
  }
  $ret[] = array(
    'success' => TRUE,
    'query' => 'Updated the module settings',
  );
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6143() {
  $ret = array();
  if (db_table_exists('nodewords_10')) {
    db_drop_table($ret, 'nodewords_10');
  }

  // Only update if the setting have the default value, and if it has been
  // previously set.
  $value = variable_get('nodewords_max_size', NULL);
  if (isset($value) && $value == 255) {
    variable_set('nodewords_max_size', 350);
    $ret[] = array(
      'success' => TRUE,
      'query' => check_plain('The default maximum meta tags length has been extended to 350 characters to improve Google results pages. See http://googleblog.blogspot.com/2009/03/two-new-improvements-to-google-results.html for more information'),
    );
  }
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6145() {
  $ret = array();
  db_drop_unique_key($ret, 'nodewords', 'tin');
  db_drop_index($ret, 'nodewords', 'nodewords_id');
  db_drop_index($ret, 'nodewords', 'nodewords_type');
  db_add_field($ret, 'nodewords', 'language', array(
    'type' => 'varchar',
    'length' => 12,
    'not null' => TRUE,
    'default' => '',
  ));
  db_add_index($ret, 'nodewords', 'nodewords_lang', array(
    array(
      'language',
      6,
    ),
  ));
  db_add_index($ret, 'nodewords', 'nodewords_name', array(
    array(
      'name',
      6,
    ),
  ));
  db_add_index($ret, 'nodewords', 'nodewords_type_id', array(
    array(
      'type',
      6,
    ),
    array(
      'id',
      6,
    ),
  ));
  db_add_unique_key($ret, 'nodewords', 'nodewords_type_id_name_lang', array(
    'type',
    'id',
    'name',
    'language',
  ));
  return $ret;
}

/**
 * Implements hook_update_N().
 */
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;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6147() {
  $ret = array();
  if (db_column_exists('nodewords', 'language')) {
    db_drop_unique_key($ret, 'nodewords', 'nodewords_type_id_name_lang');
    db_drop_index($ret, 'nodewords', 'nodewords_lang');
    db_drop_field($ret, 'nodewords', 'language');
  }
  db_add_unique_key($ret, 'nodewords', 'nodewords_type_id_name', array(
    'type',
    'id',
    'name',
  ));
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6149() {
  $ret = array();
  $value = variable_get('nodewords_basic_use_alt_attribute', NULL);
  if (isset($value)) {
    variable_set('nodewords_use_alt_attribute', $value);
    variable_del('nodewords_basic_use_alt_attribute');
  }
  $ret[] = array(
    'success' => TRUE,
    'query' => 'Updated the module settings',
  );
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6150() {
  $ret = array();
  if (!db_column_exists('nodewords_custom', 'name')) {
    db_add_field($ret, 'nodewords_custom', 'name', array(
      'type' => 'text',
      'size' => 'medium',
      'not null' => TRUE,
    ));
  }
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6151(&$sandbox) {
  $ret = array();
  if (!isset($sandbox['progress'])) {
    $sandbox['progress'] = 0;
    $sandbox['current_pid'] = 0;
    $sandbox['max'] = db_result(db_query("SELECT COUNT(*) FROM {nodewords_custom} WHERE name = ''"));
  }
  if ($sandbox['max']) {
    $pages = db_query_range("SELECT * FROM {nodewords_custom} WHERE name = '' AND pid > %d ORDER BY pid ASC", $sandbox['current_pid'], 0, 10);
    while ($page = db_fetch_object($pages)) {
      $ret[] = update_sql("UPDATE {nodewords_custom} SET name = '" . db_escape_string("Custom page #{$sandbox['progress']}") . "' WHERE pid = " . $page->pid);
      $sandbox['current_pid'] = $page->pid;
      $sandbox['progress']++;
    }
  }
  $ret['#finished'] = empty($sandbox['max']) ? 1 : $sandbox['progress'] / $sandbox['max'];
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6153() {
  $ret = array();
  $schema['nodewords_custom'] = array(
    'fields' => array(
      'pid' => array(
        'description' => 'The primary key.',
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'path' => array(
        'type' => 'text',
        'size' => 'medium',
        'not null' => TRUE,
      ),
      'weight' => array(
        'type' => 'int',
        'size' => 'small',
        'not null' => TRUE,
        'default' => 0,
      ),
      'enabled' => array(
        'type' => 'int',
        'size' => 'small',
        'not null' => TRUE,
        'default' => 1,
      ),
    ),
    'primary key' => array(
      'pid',
    ),
  );
  if (db_table_exists('nodewords_custom')) {
    db_drop_unique_key($ret, 'nodewords_custom', 'path');
  }
  else {
    db_create_table($ret, 'nodewords_custom', $schema['nodewords_custom']);
  }
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6154() {
  $ret = array();
  db_change_field($ret, 'nodewords_custom', 'name', 'name', array(
    'type' => 'varchar',
    'length' => 60,
    'not null' => TRUE,
    'default' => '',
  ));
  db_change_field($ret, 'nodewords_custom', 'path', 'path', array(
    'type' => 'text',
    'size' => 'medium',
    'not null' => TRUE,
  ));
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6158(&$sandbox) {
  $names = array(
    'dc.date',
    'location',
    'robots',
  );
  $ret = array();
  if (!isset($sandbox['progress'])) {
    $sandbox['progress'] = 0;
    $sandbox['max'] = (int) db_result(db_query("SELECT COUNT(*) FROM {nodewords}"));
    $sandbox['current_mtid'] = 0;
  }
  if ($sandbox['max']) {
    $metatags = db_query_range("SELECT * FROM {nodewords} WHERE mtid > %d ORDER BY mtid ASC", $sandbox['current_mtid'], 0, 20);
    while ($metatag = db_fetch_object($metatags)) {
      if (!in_array($metatag->name, $names)) {

        // Verify if the meta tag content has been already serialized, and
        // serialize it if it is not.
        // The error is being suppressed because if unserialize() returns an error,
        // then the passed value has not been serialiazed.
        if (@unserialize($metatag->content) === FALSE) {
          $content = serialize(array(
            'value' => $metatag->content,
          ));
          db_query("UPDATE {nodewords} SET content = '%s' WHERE mtid = %d", $content, $metatag->mtid);
        }
      }
      $sandbox['current_mtid'] = $metatag->mtid;
      $sandbox['progress']++;
    }
  }
  $ret['#finished'] = empty($sandbox['max']) ? 1 : $sandbox['progress'] / $sandbox['max'];
  if ($ret['#finished'] == 1) {
    variable_set('nodewords_update_6156', TRUE);
  }
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6159(&$sandbox) {
  $ret = array();
  if (!isset($sandbox['progress'])) {
    $sandbox['progress'] = 0;
    $sandbox['max'] = (int) db_result(db_query("SELECT COUNT(*) FROM {nodewords} WHERE name = 'robots'"));
    $sandbox['current_mtid'] = 0;
  }
  if ($sandbox['max']) {
    $metatags = db_query_range("SELECT * FROM {nodewords} WHERE name = 'robots' AND mtid > %d ORDER BY mtid ASC", $sandbox['current_mtid'], 0, 20);
    while ($metatag = db_fetch_object($metatags)) {

      // The errors are suppressed to allow the update function to fix as
      // much rows as possible; if the call to unserialize returns an error,
      // then the content of that row is possibly corrupted.
      if (($content = @unserialize($metatag->content)) !== FALSE) {
        if (isset($content['value'])) {
          if (($value = @unserialize($content['value'])) !== FALSE) {
            db_query("UPDATE {nodewords} SET content = '%s' WHERE mtid = %d", serialize($value), $metatag->mtid);
          }
        }
      }
      $sandbox['current_mtid'] = $metatag->mtid;
      $sandbox['progress']++;
    }
  }
  $ret['#finished'] = empty($sandbox['max']) ? 1 : $sandbox['progress'] / $sandbox['max'];
  if ($ret['#finished'] == 1) {
    variable_set('nodewords_update_6159', TRUE);
    $ret[] = array(
      'success' => TRUE,
      'query' => 'Corrected the values saved in the database',
    );
  }
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6160(&$sandbox) {
  $ret = array();
  drupal_load('module', 'nodewords');
  if (!isset($sandbox['progress'])) {
    $sandbox['progress'] = 0;
  }
  $old_types = array(
    'default',
    'errorpage',
    'frontpage',
    'node',
    'page',
    'pager',
    'term',
    'tracker',
    'user',
    'vocabulary',
  );
  $new_types = array(
    NODEWORDS_TYPE_DEFAULT,
    NODEWORDS_TYPE_ERRORPAGE,
    NODEWORDS_TYPE_FRONTPAGE,
    NODEWORDS_TYPE_NODE,
    NODEWORDS_TYPE_PAGE,
    NODEWORDS_TYPE_PAGER,
    NODEWORDS_TYPE_TERM,
    NODEWORDS_TYPE_TRACKER,
    NODEWORDS_TYPE_USER,
    NODEWORDS_TYPE_VOCABULARY,
  );
  $ret[] = update_sql("UPDATE {nodewords} SET type = '" . $new_types[$sandbox['progress']] . "' WHERE type = '" . $old_types[$sandbox['progress']++] . "'");
  $ret['#finished'] = $sandbox['progress'] / 10;
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6161(&$sandbox) {
  $ret = array();
  drupal_load('module', 'nodewords');
  if (!isset($sandbox['progress'])) {
    $sandbox['progress'] = 0;
    $sandbox['max'] = db_result(db_query("SELECT COUNT(*) FROM {nodewords_custom}"));
    $sandbox['current_pid'] = 0;
  }
  if ($sandbox['max']) {
    $metatags = db_query_range("SELECT * FROM {nodewords_custom} WHERE pid > %d", $sandbox['current_pid'], 0, 10);
    while ($metatag = db_fetch_object($metatags)) {
      $ret[] = update_sql("UPDATE {nodewords} SET id = '" . $metatag->pid . "' WHERE id = '" . db_escape_string(drupal_truncate_bytes($metatag->path, 255)) . "'");
      $sandbox['current_pid'] = $metatag->pid;
      $sandbox['progress']++;
    }
  }
  $ret['#finished'] = empty($sandbox['max']) ? 1 : $sandbox['progress'] / $sandbox['max'];
  if ($ret['#finished'] == 1) {
    $ret[] = array(
      'success' => TRUE,
      'query' => 'Corrected the values saved in the database',
    );
  }
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6164() {
  $node_types = array_keys(node_get_types('names'));
  $ret = array();
  $value = variable_get('nodewords_basic_use_teaser', NULL);
  if (isset($value)) {
    variable_set('nodewords_use_teaser', $value);
  }
  $value = variable_get('nodewords_basic_user_teaser', NULL);
  if (isset($value)) {
    variable_set('nodewords_user_teaser', $value);
  }
  foreach ($node_types as $node_type) {
    $value = variable_get('nodewords_basic_use_teaser_' . $node_type, NULL);
    if (isset($value)) {
      variable_set('nodewords_use_teaser_' . $node_type, $value);
      variable_del('nodewords_basic_use_teaser_' . $node_type);
    }
    $value = variable_get('nodewords_basic_user_teaser_' . $node_type, NULL);
    if (isset($value)) {
      variable_del('nodewords_basic_user_teaser_' . $node_type);
    }
  }
  $value = variable_get('nodewords_use_teaser', NULL);
  if (isset($value) && $value) {
    variable_set('metatags_generation_method', 2);
  }
  variable_set('nodewords_6164', TRUE);
  $ret[] = array(
    'success' => TRUE,
    'query' => 'Updated the module settings',
  );
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6167() {
  $ret = array();
  $ret[] = update_sql('DELETE FROM {nodewords} WHERE type = 0');
  variable_set('nodewords_update_6166', TRUE);
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6168() {
  $ret = array();
  drupal_load('module', 'nodewords');
  $bool = db_result(db_query('SELECT COUNT(*) FROM {nodewords} WHERE type = %d', NODEWORDS_TYPE_TRACKER)) && !db_result(db_query("SELECT COUNT(*) FROM {nodewords_custom} WHERE name = 'tracker'"));
  if ($bool) {
    $row = new stdClass();
    $row->name = 'tracker';
    $row->path = "user/*/track\ntracker\ntracker/*";
    if (drupal_write_record('nodewords_custom', $row)) {
      $ret[] = update_sql("UPDATE {nodewords} SET type = '" . NODEWORDS_TYPE_PAGE . "', id = '" . $row->pid . "' WHERE type = '" . NODEWORDS_TYPE_TRACKER . "'");
    }
  }
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6169() {
  $ret = array();
  if (!db_column_exists('nodewords_custom', 'weight')) {
    db_add_field($ret, 'nodewords_custom', 'weight', array(
      'type' => 'int',
      'size' => 'small',
      'not null' => TRUE,
      'default' => 0,
    ));
  }
  else {
    db_change_field($ret, 'nodewords_custom', 'weight', 'weight', array(
      'type' => 'int',
      'size' => 'small',
      'not null' => TRUE,
      'default' => 0,
    ));
  }
  if (!db_column_exists('nodewords_custom', 'enabled')) {
    db_add_field($ret, 'nodewords_custom', 'enabled', array(
      'type' => 'int',
      'size' => 'small',
      'unsigned' => TRUE,
      'not null' => TRUE,
      'default' => 1,
    ));
  }
  else {
    db_change_field($ret, 'nodewords_custom', 'enabled', 'enabled', array(
      'type' => 'int',
      'size' => 'small',
      'unsigned' => TRUE,
      'not null' => TRUE,
      'default' => 1,
    ));
  }
  if (!db_column_exists('nodewords', 'type')) {
    db_add_field($ret, 'nodewords', 'type', array(
      'type' => 'int',
      'size' => 'small',
      'unsigned' => TRUE,
      'not null' => TRUE,
      'default' => 0,
    ));
    db_add_index($ret, 'nodewords', 'nodewords_type_id', array(
      'type',
      'id',
    ));
    db_add_unique_key($ret, 'nodewords', 'nodewords_type_id_name', array(
      'type',
      'id',
      'name',
    ));
  }
  else {
    db_drop_index($ret, 'nodewords', 'nodewords_type_id');
    db_drop_unique_key($ret, 'nodewords', 'nodewords_type_id_name');
    db_change_field($ret, 'nodewords', 'type', 'type', array(
      'type' => 'int',
      'size' => 'small',
      'unsigned' => TRUE,
      'not null' => TRUE,
      'default' => 0,
    ));
    db_add_index($ret, 'nodewords', 'nodewords_type_id', array(
      'type',
      'id',
    ));
    db_add_unique_key($ret, 'nodewords', 'nodewords_type_id_name', array(
      'type',
      'id',
      'name',
    ));
  }
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6170() {
  $ret = array();
  db_drop_index($ret, 'nodewords', 'nodewords_type_id');
  db_drop_unique_key($ret, 'nodewords', 'nodewords_type_id_name');
  db_change_field($ret, 'nodewords', 'type', 'type', array(
    'type' => 'int',
    'size' => 'small',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_change_field($ret, 'nodewords', 'id', 'id', array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_add_index($ret, 'nodewords', 'nodewords_type_id', array(
    'type',
    'id',
  ));
  db_add_unique_key($ret, 'nodewords', 'nodewords_type_id_name', array(
    'type',
    'id',
    'name',
  ));
  variable_set('nodewords_update', 6169);
  return $ret;
}

/**
 * Implements hook_update_N().
 */
function nodewords_update_6173() {
  $ret = array();
  if (!variable_get('menu_rebuild_needed', FALSE)) {
    variable_set('menu_rebuild_needed', TRUE);
    $ret[] = array(
      'success' => TRUE,
      'query' => 'Updated the menu callback definitions',
    );
  }
  return $ret;
}

/**
 * Remove the site verification functionality.
 */
function nodewords_update_6174() {
  $ret = array();

  // Delete the unnecessary variables.
  $engines = array(
    'alexa_verification_code',
    'bing_webmaster_center',
    'google_webmaster_tools',
    'yahoo_site_explorer',
    'yandex_webmaster_tools',
  );
  $nodewords_admin_edit = variable_get('nodewords_admin_edit', array());
  $nodewords_head = variable_get('nodewords_head', array());
  $nodewords_search_index = variable_get('nodewords_search_index', array());
  foreach ($engines as $engine) {
    variable_del('nodewords_admin_use_default_value_' . $engine);
    unset($nodewords_admin_edit[$engine]);
    unset($nodewords_head[$engine]);
    unset($nodewords_search_index[$engine]);
  }

  // Update the three settings arrays.
  variable_set('nodewords_admin_edit', $nodewords_admin_edit);
  variable_set('nodewords_head', $nodewords_head);
  variable_set('nodewords_search_index', $nodewords_search_index);

  // Remove the module definition from the system table.
  $ret[] = update_sql("DELETE FROM {system} WHERE name IN ('nodewords_verification_tags')");
  $ret[] = array(
    'success' => TRUE,
    'query' => 'Search engine site verification support has been removed from Nodewords, please make sure to replace this functionality with e.g. the <a href="http://drupal.org/project/site_verify">Site_Verify</a> module.  Note that the verification tags have not been removed, only some anciliary variables, allowing the other modules to convert the settings as needed.',
  );
  return $ret;
}

/**
 * Make the custom tags 'name' field larger.
 */
function nodewords_update_6175() {
  $ret = array();
  $schema = nodewords_schema();
  $table = 'nodewords_custom';
  $spec = $schema[$table];
  $field = 'name';

  // Resize the 'name' field.
  db_change_field($ret, $table, $field, $field, $spec['fields'][$field]);

  // Clear the schema cache.
  cache_clear_all('schema', 'cache');
  return $ret;
}

/**
 * Update old versions to 6.x-1.13-x. We had to jump to 6180 because 6.x-1.12-
 * releases had already jumped to 6179, so updating would try running *all*
 * updates and could potentially break the site.
 */
function nodewords_update_6180() {
  $ret = array();

  // Work out what the last version was.
  $old_rev = intval(db_result(db_query("SELECT schema_version FROM {system} WHERE name='nodewords'")));

  // Updating from a 6.x-1.12-x release.
  if ($old_rev == 6179) {
    drupal_set_message(t('You are updating from 6.x-1.12. A lot of code has been reverted, specifically the Tokens support has temporarily been removed. You should not have lost any data, but please be aware that any meta tags which depended upon Tokens will not work correctly. As a temporary solution you may wish to test the <a href="@v2alpha1">6.x-2.0-alpha1</a> version, until <a href="@tokens_link">Token support can be added to 6.x-1.x again</a>.', array(
      '@v2alpha1' => 'http://drupal.org/node/1145986',
      '@tokens_link' => 'http://drupal.org/node/1380362',
    )));
    $ret[] = update_sql("DELETE FROM {system} WHERE name IN ('nodewords_ui')");
    $ret[] = update_sql("DELETE FROM {system} WHERE name IN ('nodewords_admin')");
    $ret[] = update_sql("DELETE FROM {system} WHERE name IN ('nodewords_tokens')");
    $ret[] = update_sql("DELETE FROM {system} WHERE name IN ('nodewords_custom_pages')");
    $ret[] = array(
      'success' => TRUE,
      'query' => 'Some of the redundant submodules from the 6.x-1.12 codebase have been removed, though their variables have been left for future use.',
    );
  }
  return $ret;
}

/**
 * In 6.x-1.12-x the custom-path functionality was managed by a submodule, so
 * it is possible for sites to be updated and not have the table.
 */
function nodewords_update_6181() {
  $ret = array();
  $table = 'nodewords_custom';

  // Ensure the table exists.
  if (db_table_exists($table)) {
    $ret[] = array(
      'success' => TRUE,
      'query' => "The {$table} table already exists so nothing needs to be done.",
    );
  }
  else {
    $ret[] = array(
      'success' => TRUE,
      'query' => "The {$table} table doesn't exist so it will be added.",
    );
    $schema = nodewords_schema();
    db_create_table($ret, $table, $schema[$table]);
    $ret[] = array(
      'success' => TRUE,
      'query' => "The {$table} table has been created.",
    );
  }
  return $ret;
}

/**
 * Remove fields accidently stashed on users.data.
 */
function nodewords_update_6182(&$sandbox) {
  $ret = array();

  // The number of users to be processed per batch.
  $update_size = 100;

  // If this is the first time the script has ran, set up some counters.
  if (!isset($sandbox['progress'])) {
    $sandbox['progress'] = 0;
    $sandbox['current_uid'] = 0;

    // We'll -1 to disregard the uid 0...
    $sandbox['max'] = db_result(db_query('SELECT MAX(uid) FROM {users}'));
  }

  // Get a list of all users that have not been processed already, up to the
  // max number.
  $users = db_query_range("SELECT\n      uid, data\n    FROM {users}\n    WHERE uid > %d\n    ORDER BY uid ASC", $sandbox['current_uid'], 0, $update_size);

  // Loop over each user object.
  while ($user = db_fetch_object($users)) {
    $data = unserialize($user->data);
    if (isset($data['nodewords'])) {
      unset($data['nodewords']);

      // Update the user record.
      db_query("UPDATE {users}\n        SET data = '%s'\n        WHERE uid = %d", serialize($data), $user->uid);
    }
    $sandbox['current_uid'] = $user->uid;
  }
  $ret['#finished'] = empty($sandbox['max']) || $sandbox['current_uid'] > $sandbox['max'] ? 1 : $sandbox['current_uid'] / $sandbox['max'];
  return $ret;
}

/**
 * Notify the user that the /forum main page's meta tags are now handled via
 * the new settings page.
 */
function nodewords_update_6183() {
  $ret = array();

  // If the forum module is enabled notify the user.
  if (module_exists('forum')) {
    $ret[] = array(
      'success' => TRUE,
      'query' => t('Meta tags for the main forum page are now handled by a custom <a href="@url">forum settings page<a/>. Any existing meta tags defined via a custom page page will need to be manually converted.', array(
        '@url' => 'admin/content/nodewords/meta-tags/forum',
      )),
    );
  }
  return $ret;
}

/**
 * Inform users that the module has changed regarding deciding which tags are
 * output to now automatically output all non-empty tags.
 */
function nodewords_update_6184() {
  $ret = array();
  drupal_set_message(t('The Nodewords module will now automatically output all tags that are not empty.'));
  variable_del('nodewords_head');
  return $ret;
}

/**
 * Notify the user that the /blog main page's meta tags are now handled via
 * the new settings page.
 */
function nodewords_update_6185() {
  $ret = array();

  // Notify the user about the new settings page if the blog module is enabled.
  if (module_exists('blog')) {
    $ret[] = array(
      'success' => TRUE,
      'query' => t('Meta tags for the main blog page are now handled by a custom <a href="@url">blog settings page<a/>. Any existing meta tags defined via a custom page page will need to be manually converted.', array(
        '@url' => 'admin/content/nodewords/meta-tags/blog',
      )),
    );
  }
  return $ret;
}

/**
 * Expand the {nodewords}.name field to allow for longer meta tag names,
 */
function nodewords_update_6186() {
  $ret = array();
  $table = 'nodewords';
  $field = 'name';
  $spec = array(
    'description' => 'The meta tag name.',
    'type' => 'varchar',
    'length' => 128,
    'not null' => TRUE,
    'default' => '',
  );

  // Save the changes.
  db_change_field($ret, $table, $field, $field, $spec);
  return $ret;
}

/**
 * Remove an unused variable.
 */
function nodewords_update_6187() {
  $ret = array();
  drupal_set_message(t('A legacy variable has been removed.'));
  variable_del('nodewords_filter_regexp');
  return $ret;
}

/**
 * Migrate data from Nodewords_PageTitle and disable it.
 */
function nodewords_update_6188() {
  $ret = array();

  // Converty any data that might exist for Nodewords_PageTitle.
  $ret[] = update_sql("UPDATE {nodewords} SET name='page_title' WHERE name='page.title'");

  // If Nodewords_PageTitle is installed, disable it.
  if (module_exists('nodewords_pagetitle')) {

    // Disable the module.
    module_disable(array(
      'nodewords_pagetitle',
    ));

    // Uninstall the module.
    drupal_uninstall_module('nodewords_pagetitle');

    // Say 'cheese'!
    $ret[] = array(
      'success' => TRUE,
      'query' => 'Nodewords_PageTitle was found. It is incompatible with 6.x-1.13 and newer releases of Nodewords. Luckily its functionality has been added into Nodewords itself, so it has been disabled and all data has been converted over. The Nodewords_PageTitle files can now be removed.',
    );
  }
  else {

    // Say 'cheese'!
    $ret[] = array(
      'success' => TRUE,
      'query' => 'The Nodewords_PageTitle module is incompatible with this verison of Nodewords, and is no longer necessary as Nodewords can handle the page title directly. Just in case, any data from that module has been converted to work with Nodewords.',
    );
  }
  return $ret;
}

Functions

Namesort descending Description
nodewords_install Implements hook_install().
nodewords_requirements Implements hook_requirements().
nodewords_schema Implements hook_schema().
nodewords_uninstall Implements hook_uninstall().
nodewords_update_6100 Implements hook_update_N().
nodewords_update_6102 Implements hook_update_N().
nodewords_update_6103 Implements hook_update_N().
nodewords_update_6104 Implements hook_update_N().
nodewords_update_6106 Implements hook_update_N().
nodewords_update_6113 Implements hook_update_N().
nodewords_update_6115 Implements hook_update_N().
nodewords_update_6117 Implements hook_update_N().
nodewords_update_6120 Implements hook_update_N().
nodewords_update_6122 Implements hook_update_N().
nodewords_update_6128 Implements hook_update_N().
nodewords_update_6131 Implements hook_update_N().
nodewords_update_6135 Implements hook_update_N().
nodewords_update_6136 Implements hook_update_N().
nodewords_update_6137 Implements hook_update_N().
nodewords_update_6140 Implements hook_update_N().
nodewords_update_6143 Implements hook_update_N().
nodewords_update_6145 Implements hook_update_N().
nodewords_update_6146 Implements hook_update_N().
nodewords_update_6147 Implements hook_update_N().
nodewords_update_6149 Implements hook_update_N().
nodewords_update_6150 Implements hook_update_N().
nodewords_update_6151 Implements hook_update_N().
nodewords_update_6153 Implements hook_update_N().
nodewords_update_6154 Implements hook_update_N().
nodewords_update_6158 Implements hook_update_N().
nodewords_update_6159 Implements hook_update_N().
nodewords_update_6160 Implements hook_update_N().
nodewords_update_6161 Implements hook_update_N().
nodewords_update_6164 Implements hook_update_N().
nodewords_update_6167 Implements hook_update_N().
nodewords_update_6168 Implements hook_update_N().
nodewords_update_6169 Implements hook_update_N().
nodewords_update_6170 Implements hook_update_N().
nodewords_update_6173 Implements hook_update_N().
nodewords_update_6174 Remove the site verification functionality.
nodewords_update_6175 Make the custom tags 'name' field larger.
nodewords_update_6180 Update old versions to 6.x-1.13-x. We had to jump to 6180 because 6.x-1.12- releases had already jumped to 6179, so updating would try running *all* updates and could potentially break the site.
nodewords_update_6181 In 6.x-1.12-x the custom-path functionality was managed by a submodule, so it is possible for sites to be updated and not have the table.
nodewords_update_6182 Remove fields accidently stashed on users.data.
nodewords_update_6183 Notify the user that the /forum main page's meta tags are now handled via the new settings page.
nodewords_update_6184 Inform users that the module has changed regarding deciding which tags are output to now automatically output all non-empty tags.
nodewords_update_6185 Notify the user that the /blog main page's meta tags are now handled via the new settings page.
nodewords_update_6186 Expand the {nodewords}.name field to allow for longer meta tag names,
nodewords_update_6187 Remove an unused variable.
nodewords_update_6188 Migrate data from Nodewords_PageTitle and disable it.