You are here

function drupal_init_path in Drupal 4

Same name and namespace in other branches
  1. 5 includes/path.inc \drupal_init_path()
  2. 6 includes/path.inc \drupal_init_path()

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

1 call to drupal_init_path()
_drupal_bootstrap in includes/bootstrap.inc

File

includes/path.inc, line 15
Functions to handle paths in Drupal, including path aliasing.

Code

function drupal_init_path() {
  if (!empty($_GET['q'])) {
    $_GET['q'] = drupal_get_normal_path(trim($_GET['q'], '/'));
  }
  else {
    $_GET['q'] = drupal_get_normal_path(variable_get('site_frontpage', 'node'));
  }
}