1 path.inc backdrop_path_initialize()

Initialize the $_GET['q'] variable to the proper normal path.

File

core/includes/path.inc, line 14
Functions to handle paths in Backdrop, including URL aliasing.

Code

function backdrop_path_initialize() {
  // Ensure $_GET['q'] is set before calling backdrop_get_normal_path(), to
  // support path caching with hook_url_inbound_alter().
  if (empty($_GET['q'])) {
    $_GET['q'] = config_get('system.core', 'site_frontpage');
  }
  $_GET['q'] = backdrop_get_normal_path($_GET['q']);
}