Browse Source

fix typo in web_util

master
Duke Leto 16 years ago
parent
commit
eecfe03a1e
  1. 4
      php_lib/web_util.php

4
php_lib/web_util.php

@ -1,3 +1,4 @@
<?
// Code to determine whether this is a search engine request
// and set a cookie if it is
$r = $_SERVER['HTTP_REFERER'];
@ -9,7 +10,7 @@ $engines = array('/search?',
'live.com',
);
foreach ($engine as $eng) {
foreach ($engines as $eng) {
if (strpos($r,$eng) !== false) {
$search_request = 42;
setcookie('search_request', 42, time() + 4242, '/', '.leto.net');
@ -20,3 +21,4 @@ function is_search_request() {
global $search_request;
return ( $search_request == 42 || $_COOKIE['search_request'] == 42 );
}
?>

Loading…
Cancel
Save