Cleaned up regex a little.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-04-16 02:45:18 +00:00
parent 086d059e15
commit 9b3163412c
1 changed files with 3 additions and 3 deletions

View File

@ -65,19 +65,19 @@ function is_referer_search_engine($engine = 'google') {
switch ($engine) {
case 'google':
if (preg_match('/^http:\/\/w?w?w?\.?google.*/i', $referer)) {
if (preg_match('|^http://(www)?\.?google.*|i', $referer)) {
return 1;
}
break;
case 'lycos':
if (preg_match('/^http:\/\/search\.lycos.*/i', $referer)) {
if (preg_match('|^http://search\.lycos.*|i', $referer)) {
return 1;
}
break;
case 'yahoo':
if (preg_match('/^http:\/\/search\.yahoo.*/i', $referer)) {
if (preg_match('|^http://search\.yahoo.*|i', $referer)) {
return 1;
}
break;