1 redirect.module redirect_exit($destination = NULL)

Implements hook_exit().

File

core/modules/redirect/redirect.module, line 310

Code

function redirect_exit($destination = NULL) {
  // If the current page is being cached, track it.
  if (backdrop_get_http_header('Location') && $rid = backdrop_get_http_header('X-Redirect-ID')) {
    // Ensure the database is loaded. This is only the next bootstrap step
    // after BACKDROP_BOOTSTRAP_DATABASE.
    backdrop_bootstrap(BACKDROP_BOOTSTRAP_DATABASE);
    db_update('redirect')
      ->fields(array('access' => REQUEST_TIME))
      ->expression('count', 'count + 1')
      ->condition('rid', $rid)
      ->execute();
  }
}