mirror of
https://github.com/Mibew/mibew.git
synced 2024-11-16 00:54:12 +03:00
don't index ru
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@358 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
parent
5caeae8773
commit
36c6bca4cd
@ -82,6 +82,12 @@ function get_locale() {
|
||||
|
||||
if( !$locale || !in_array($locale,$available_locales) )
|
||||
$locale = get_user_locale();
|
||||
|
||||
$useragent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : "";
|
||||
if( $locale == 'ru' && preg_match( "/googlebot[\\s\/]?(\\d+(\\.\\d+)?)/", $useragent) ) {
|
||||
$locale = "en";
|
||||
}
|
||||
|
||||
return $locale;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user