1 install.core.inc install_system_module(&$install_state)

Installation task; install the Backdrop system module.

Parameters

$install_state: An array of information about the current installation state.

File

core/includes/install.core.inc, line 816
API functions for installing Backdrop.

Code

function install_system_module(&$install_state) {
  // Install system.module.
  backdrop_install_system();

  // Call file_ensure_htaccess() to ensure that all of Backdrop's standard
  // directories (e.g., the public and private files directories) have
  // appropriate .htaccess files. These directories will have already been
  // created by this point in the installer, since Backdrop creates them during
  // the install_verify_requirements() task. Note that we cannot call
  // file_ensure_htaccess() any earlier than this, since it relies on
  // system.module in order to work.
  file_ensure_htaccess();

  // Enable the entity and user modules so that sessions can be recorded during
  // the upcoming bootstrap step.
  module_enable(array('entity', 'user'), FALSE);

  // Save the list of other modules to install for the upcoming tasks.
  // state_set() can be used now that system.module is installed.
  $modules = $install_state['profile_info']['dependencies'];

  // The installation profile is also a module, which needs to be installed
  // after all the dependencies have been installed.
  $modules[] = $install_state['parameters']['profile'];

  state_set('install_profile_modules', array_diff($modules, array('system')));
  $install_state['database_tables_exist'] = TRUE;

  // Prevent the hook_requirements() check from telling us to convert the
  // database to utf8mb4.
  $connection = Database::getConnection();
  if ($connection->utf8mb4IsActive()) {
    state_set('database_utf8mb4_active', TRUE);
  }
}