summaryrefslogtreecommitdiff
path: root/modules/system.module
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2006-01-21 01:42:52 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2006-01-21 01:42:52 +0000
commit7914ad0f3f9b29d78e7321ad9addbff99de48a4f (patch)
treebb97f37f191c966993a9607daa9f4168591dd68c /modules/system.module
parent0ff0c4beaaf0ae49e8b9b7afeda83a26d8d59666 (diff)
downloadbrdo-7914ad0f3f9b29d78e7321ad9addbff99de48a4f.tar.gz
brdo-7914ad0f3f9b29d78e7321ad9addbff99de48a4f.tar.bz2
- #40515: Ensure UTF-8 character set on the database side (and include upgrade path for incorrectly set up databases)
Diffstat (limited to 'modules/system.module')
-rw-r--r--modules/system.module8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/system.module b/modules/system.module
index 2f3a41385..bf2250d79 100644
--- a/modules/system.module
+++ b/modules/system.module
@@ -472,6 +472,10 @@ function system_view_general() {
$form['cron'] = array('#type' => 'fieldset', '#title' => t('Cron jobs'), '#collapsible' => TRUE, '#collapsed' => TRUE);
$form['cron'] = array_merge($form['cron'], system_cron_settings());
+ // Check database setup if necessary
+ if (function_exists('db_check_setup') && empty($_POST)) {
+ db_check_setup();
+ }
return $form;
}
@@ -1010,8 +1014,8 @@ function system_modules_submit($form_id, $edit) {
foreach ($new_modules as $module) {
// Set the installed schema version for newly-enabled modules
$versions = drupal_get_schema_versions($module);
- if ($versions !== FALSE && drupal_get_installed_schema_version($module) == 0) {
- drupal_set_installed_schema_version($module, max($versions));
+ if (drupal_get_installed_schema_version($module) == SCHEMA_UNINSTALLED) {
+ drupal_set_installed_schema_version($module, $versions ? max($versions) : SCHEMA_INSTALLED);
}
}