function mobile_tools_prepare_url in Mobile Tools 6
Same name and namespace in other branches
- 5 mobile_tools.module \mobile_tools_prepare_url()
- 6.3 mobile_tools.module \mobile_tools_prepare_url()
This function does some kind of normalisation of the urls when there is no subdomain available in the url e.g. domain.com becomes www.domain.com . this is because sometimes both www.domain.com and domain.com are the same
1 call to mobile_tools_prepare_url()
File
- ./mobile_tools.module, line 487 
- Mobile Tools provides a range of functionality assisting in creating a mobile Drupal site . this functionality contains:
Code
function mobile_tools_prepare_url($url) {
  $_url = parse_url($url);
  $_url = $url['host'];
  $_url = explode(".", $_url);
  if (count($_url) == 2) {
    return 'www' . implode(".", $_url);
  }
  else {
    return $url;
  }
}