function purl_init in Persistent URL 7
Same name and namespace in other branches
- 6 purl.module \purl_init()
Implements hook_init(). Checks for any valid persistent urls in request string and fire callback appropriately
File
- ./purl.module, line 118 
Code
function purl_init() {
  static $once;
  if (!isset($once)) {
    $once = TRUE;
    // Initialize a few things so that we can use them without warnings.
    if (!isset($_GET['q'])) {
      $_GET['q'] = '';
    }
    // Initialize the PURL path modification stack.
    purl_inited(TRUE);
    // TODO - is this still needed?? (Does language_init still modify $_GET['q'])
    // $_GET['q'] = $q = purl_language_strip($_REQUEST['q']);
    $_GET['q'] = $q = $_GET['q'];
    drupal_path_initialize();
    purl_get_normal_path($q, TRUE);
  }
}