function system_install
Same name and namespace in other branches
- 6.x drupal-6.x/modules/system/system.install \system_install()
Implements hook_install().
Archivo
- drupal-7.x/
modules/ system/ system.install, line 523 - Install, update and uninstall functions for the system module.
Código
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);
// 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);
}