function system_install
Same name in other branches
- 9 core/modules/system/system.install \system_install()
- 8.9.x core/modules/system/system.install \system_install()
- 10 core/modules/system/system.install \system_install()
- 11.x core/modules/system/system.install \system_install()
Implements hook_install().
File
-
modules/
system/ system.install, line 645
Code
function system_install() {
// Create tables.
drupal_install_schema('system');
$versions = drupal_get_schema_versions('system');
$version = $versions ? max($versions) : SCHEMA_INSTALLED;
drupal_set_installed_schema_version('system', $version);
// Clear out module list and hook implementation statics before calling
// system_rebuild_theme_data().
module_list(TRUE);
module_implements('', FALSE, TRUE);
// Ensure the schema versions are not based on a previous module list.
drupal_static_reset('drupal_get_schema_versions');
// Load system theme data appropriately.
system_rebuild_theme_data();
// Enable the default theme.
variable_set('theme_default', 'bartik');
db_update('system')->fields(array(
'status' => 1,
))
->condition('type', 'theme')
->condition('name', 'bartik')
->execute();
// Populate the cron key variable.
$cron_key = drupal_random_key();
variable_set('cron_key', $cron_key);
// This variable indicates that the database is ready for hashed session ids.
variable_set('hashed_session_ids_supported', TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.