function uc_store_exit in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_store/uc_store.module \uc_store_exit()
Implementation of hook_exit().
File
- uc_store/
uc_store.module, line 501 - Contains global Ubercart functions and store administration functionality.
Code
function uc_store_exit() {
// Save the current request for tracking paths on subsequent page requests.
// When HTTP_REFERER is set, the session version is not; and vice versa.
if (referer_uri() == '') {
$protocol = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http';
$_SESSION['uc_referer_uri'] = $protocol . '://' . $_SERVER['SERVER_NAME'] . $GLOBALS['base_path'] . $_GET['q'];
}
else {
if (isset($_SESSION['uc_referer_uri'])) {
unset($_SESSION['uc_referer_uri']);
}
}
// Save the timestamp of the last access.
// $_SESSION['uc_last_access'] = time();
}