You are here

function _context_mobile_detect_add_query_string in Context Mobile Detect 7

Same name and namespace in other branches
  1. 7.2 context_mobile_detect.module \_context_mobile_detect_add_query_string()
1 call to _context_mobile_detect_add_query_string()
context_mobile_detect_preboot in ./context_mobile_detect.module
Called via settings.inc; needs to be added to settings.php manually.

File

./context_mobile_detect.module, line 114

Code

function _context_mobile_detect_add_query_string($str) {
  if (isset($_SERVER['REQUEST_URI'])) {
    if (strpos($_SERVER['REQUEST_URI'], '?') === FALSE) {
      $_SERVER['REQUEST_URI'] .= '?' . $str;
    }
    else {
      $_SERVER['REQUEST_URI'] .= '&' . $str;
    }
  }

  // TODO: Non-apache not supported
}