From: moodler Date: Sun, 16 May 2004 14:19:35 +0000 (+0000) Subject: Allow other Google thigns into the site too ... in particular translate.google.com X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2d33fc00d19431567bbf48f0564988efa4cff3df;p=moodle.git Allow other Google thigns into the site too ... in particular translate.google.com --- diff --git a/lib/setup.php b/lib/setup.php index 1513a9d085..fe6c9db774 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -245,6 +245,9 @@ if (strpos($_SERVER['HTTP_USER_AGENT'], 'Googlebot') !== false ) { $USER = guest_user(); } + if (strpos($_SERVER['HTTP_USER_AGENT'], 'google.com') !== false ) { + $USER = guest_user(); + } } if (empty($_SESSION['USER']) and !empty($_SERVER['HTTP_REFERER'])) { if (strpos($_SERVER['HTTP_REFERER'], 'google') !== false ) {