You are here

function authcache_p13n_frontcontroller_prepare_request in Authenticated User Page Caching (Authcache) 7.2

Parse request parameters and restore original GET-parameters.

@retrn array $req Parsed request parameters suitable for passing to authcache_p13n_frontcontroller_handle_request

Note: This function must be called before drupal_bootstrap.

Parameters

array $get: The GET-parameters operated on. Defaults to &$_GET

See also

authcache_p13n_frontcontroller_prepare_request()

2 calls to authcache_p13n_frontcontroller_prepare_request()
authcache.php in modules/authcache_p13n/safe_frontcontroller/authcache.php
Alternative front controller for user specific content fragments.
authcache.php in modules/authcache_p13n/frontcontroller/authcache.php
Default front controller for user specific content fragments.

File

modules/authcache_p13n/includes/frontcontroller.inc, line 21
Defines the main function for the front controller.

Code

function authcache_p13n_frontcontroller_prepare_request(&$get = NULL) {
  if (!isset($get)) {

    // Sanitize unsafe keys from the request.
    require_once DRUPAL_ROOT . '/includes/request-sanitizer.inc';
    DrupalRequestSanitizer::sanitize();
    $get =& $_GET;
  }

  // Copy $_GET into $req and remove original request GET-parameters.
  $req = $get;
  unset($req['o']);

  // Restore $_GET to original GET-parameters.
  $orig = isset($get['o']) ? $get['o'] : array();
  $get = $orig;
  return $req;
}