You are here

function _ajaxblocks_fix_request_uri in Ajax Blocks 7

Same name and namespace in other branches
  1. 6 ajaxblocks.module \_ajaxblocks_fix_request_uri()

Internal function which makes request_uri() return correct value when handling AJAX request.

1 call to _ajaxblocks_fix_request_uri()
ajaxblocks_ajax_handler in ./ajaxblocks.module
Handles AJAX request and returns the content of the appropriate blocks.

File

./ajaxblocks.module, line 482
Loads dynamic blocks on cached page for anonymous users by performing AJAX request.

Code

function _ajaxblocks_fix_request_uri($path) {
  if (isset($_SERVER['REQUEST_URI'])) {
    $_SERVER['REQUEST_URI'] = '/' . $path;
  }

  // TODO support other ways to fix request_uri().
}