Changeset 1014363
- Timestamp:
- 10/26/2014 09:58:42 PM (11 years ago)
- File:
-
- 1 edited
-
mqtranslate/trunk/mqtranslate_core.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mqtranslate/trunk/mqtranslate_core.php
r989107 r1014363 120 120 if(qtrans_isEnabled($language)) { 121 121 if($q_config['hide_default_language'] && $language == $q_config['default_language']) break; 122 $target = qtrans_convertURL( get_option('home'),$language);122 $target = qtrans_convertURL(qtrans_getHome(),$language); 123 123 break; 124 124 } … … 160 160 } 161 161 162 // returns the home in HTTP or HTTPS depending on the request 163 function qtrans_getHome() { 164 $home = get_option('home'); 165 if(is_ssl()) { 166 $home = str_replace('http://', 'https://', $home); 167 } else { 168 $home = str_replace('https://', 'http://', $home); 169 } 170 return $home; 171 } 172 162 173 function qtrans_postInit() { 163 174 // init Javascript functions … … 171 182 function qtrans_extractURL($url, $host = '', $referer = '') { 172 183 global $q_config; 173 $home = qtrans_parseURL( get_option('home'));184 $home = qtrans_parseURL(qtrans_getHome()); 174 185 $home['path'] = trailingslashit($home['path']); 175 186 $referer = qtrans_parseURL($referer); … … 635 646 // check if it's an external link 636 647 $urlinfo = qtrans_parseURL($url); 637 $home = rtrim( get_option('home'),"/");648 $home = rtrim(qtrans_getHome(),"/"); 638 649 if($urlinfo['host']!='') { 639 650 // check for already existing pre-domain language information
Note: See TracChangeset
for help on using the changeset viewer.