1 path.inc backdrop_path_initialize()

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

File

core/includes/path.inc, line 15
Functions to handle paths in Backdrop, including path 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']);
}