function drupal_install_system

Same name in other branches
  1. 9 core/includes/install.inc \drupal_install_system()
  2. 8.9.x core/includes/install.inc \drupal_install_system()
  3. 10 core/includes/install.inc \drupal_install_system()
  4. 11.x core/includes/install.inc \drupal_install_system()

Installs the system module.

Separated from the installation of other modules so core system functions can be made available while other modules are installed.

2 calls to drupal_install_system()
DrupalWebTestCase::setUp in modules/simpletest/drupal_web_test_case.php
Sets up a Drupal site for running functional and integration tests.
install_system_module in includes/install.core.inc
Installation task; install the Drupal system module.

File

includes/install.inc, line 728

Code

function drupal_install_system() {
    $system_path = drupal_get_path('module', 'system');
    require_once DRUPAL_ROOT . '/' . $system_path . '/system.install';
    module_invoke('system', 'install');
    $system_versions = drupal_get_schema_versions('system');
    $system_version = $system_versions ? max($system_versions) : SCHEMA_INSTALLED;
    db_insert('system')->fields(array(
        'filename',
        'name',
        'type',
        'owner',
        'status',
        'schema_version',
        'bootstrap',
    ))
        ->values(array(
        'filename' => $system_path . '/system.module',
        'name' => 'system',
        'type' => 'module',
        'owner' => '',
        'status' => 1,
        'schema_version' => $system_version,
        'bootstrap' => 0,
    ))
        ->execute();
    system_rebuild_module_data();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.