function update_fix_access_table in Drupal 4
Same name and namespace in other branches
- 5 update.php \update_fix_access_table()
1 call to update_fix_access_table()
- update.php in ./
update.php - Administrative page for handling updates from one Drupal version to another.
File
- ./
update.php, line 580 - Administrative page for handling updates from one Drupal version to another.
Code
function update_fix_access_table() {
if (variable_get('update_access_fixed', FALSE)) {
return;
}
switch ($GLOBALS['db_type']) {
// Only for MySQL 4.1+
case 'mysqli':
break;
case 'mysql':
if (version_compare(mysql_get_server_info($GLOBALS['active_db']), '4.1.0', '<')) {
return;
}
break;
case 'pgsql':
return;
}
// Convert access table to UTF-8 if needed.
$result = db_fetch_array(db_query('SHOW CREATE TABLE {access}'));
if (!preg_match('/utf8/i', array_pop($result))) {
update_convert_table_utf8('access');
}
// Don't run again
variable_set('update_access_fixed', TRUE);
}