You are here

function system_update_169 in Drupal 5

Same name and namespace in other branches
  1. 4 database/updates.inc \system_update_169()

File

modules/system/system.install, line 2562

Code

function system_update_169() {

  // Warn PGSQL admins if their database is set up incorrectly
  if ($GLOBALS['db_type'] == 'pgsql') {
    $encoding = db_result(db_query('SHOW server_encoding'));
    if (!in_array(strtolower($encoding), array(
      'unicode',
      'utf8',
    ))) {
      $msg = 'Your PostgreSQL database is set up with the wrong character encoding (' . $encoding . '). It is possible it will not work as expected. It is advised to recreate it with UTF-8/Unicode encoding. More information can be found in the <a href="http://www.postgresql.org/docs/7.4/interactive/multibyte.html">PostgreSQL documentation</a>.';
      watchdog('php', $msg, WATCHDOG_WARNING);
      drupal_set_message($msg, 'status');
    }
  }

  // Note: 'access' table manually updated in update.php
  return _system_update_utf8(array(
    'accesslog',
    'aggregator_category',
    'aggregator_category_feed',
    'aggregator_category_item',
    'aggregator_feed',
    'aggregator_item',
    'authmap',
    'blocks',
    'book',
    'boxes',
    'cache',
    'comments',
    'contact',
    'node_comment_statistics',
    'client',
    'client_system',
    'files',
    'filter_formats',
    'filters',
    'flood',
    'forum',
    'history',
    'locales_meta',
    'locales_source',
    'locales_target',
    'menu',
    'node',
    'node_access',
    'node_revisions',
    'profile_fields',
    'profile_values',
    'url_alias',
    'permission',
    'poll',
    'poll_votes',
    'poll_choices',
    'role',
    'search_dataset',
    'search_index',
    'search_total',
    'sessions',
    'sequences',
    'node_counter',
    'system',
    'term_data',
    'term_hierarchy',
    'term_node',
    'term_relation',
    'term_synonym',
    'users',
    'users_roles',
    'variable',
    'vocabulary',
    'vocabulary_node_types',
    'watchdog',
  ));
}