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:
Evgeny Gryaznov 2009-02-13 00:57:36 +00:00
parent 5caeae8773
commit 36c6bca4cd

View File

@ -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;
}