Active
Project:
Mobile Codes
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Aug 2011 at 14:49 UTC
Updated:
24 Aug 2011 at 14:49 UTC
When using this option, your module invokes function mobile_tools_create_mobile_url($url) to create mobile link. But that function is flawed is that it creates link that starts with m.* by default.
There are settings for Mobile Tools (admin/settings/mobile-tools) where you actually specify the domain for mobile site.
I changed some part of mobile_tools.inc for my liking:
function mobile_codes_data_url_mobile_tools(&$data) {
global $base_url;
if (strpos($data, $base_url) === 0) {
$host = variable_get('mobile_tools_mobile_url',$base_url);
$url_parsed = parse_url($data);
if (!array_key_exists('path', $url_parsed)) {
$url_parsed['path'] = "";
}
$data = mobile_tools_prepare_url($host.$url_parsed['path']);
}
}