You are here

function _high_contrast_get_current_url in High contrast 6

2 calls to _high_contrast_get_current_url()
high_contrast_switch in ./high_contrast.module
Enables/Disables high contrast styles and redirects the user to a destination url
theme_high_contrast_switcher_links in ./high_contrast.module

File

./high_contrast.module, line 254

Code

function _high_contrast_get_current_url() {
  $page_url = 'http';
  if ($_SERVER["HTTPS"] == "on") {
    $page_url .= "s";
  }
  $page_url .= "://";
  if ($_SERVER["SERVER_PORT"] != "80") {
    $page_url .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
  }
  else {
    $page_url .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
  }
  return $page_url;
}