-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix for regular expression to detect
lang=xx
- Loading branch information
1 parent
ed18810
commit 92f656f
Showing
2 changed files
with
20 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -299,7 +299,7 @@ function qtranxf_parse_language_info(&$url_info, $link=false) { | |
$lang = qtranxf_resolveLangCase($_POST['lang'],$doredirect); | ||
if($lang) $url_info['lang_query_post'] = $lang;//todo excessive? | ||
} | ||
}elseif( !empty($url_info['query']) && preg_match('/(&|&|&|\?)lang=([a-z]{2})/i',$url_info['query'],$match) ) { | ||
}elseif( !empty($url_info['query']) && preg_match('/(^|&|&|&|\?)lang=([a-z]{2})/i',$url_info['query'],$match) ) { //rx is changed in 3.4.6.5: https://github.com/qTranslate-Team/qtranslate-x/issues/288 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
johnclause
Author
Member
|
||
$lang = qtranxf_resolveLangCase($match[2],$doredirect); | ||
if($lang) $url_info['lang_query_link'] = $lang;//todo excessive? | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Why don't we just check
$_GET['lang']
?