HTTP_REFERER fixes from Joseph Scott. http://wordpress.org/support/6/6657

git-svn-id: http://svn.automattic.com/wordpress/trunk@1378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2004-06-01 02:18:36 +00:00
parent 8fff6080f9
commit 95a6e3d171
1 changed files with 5 additions and 2 deletions

View File

@ -11,7 +11,7 @@ Author URI: http://rboren.nu
/* Highlighting code c/o Ryan Boren */
function get_search_query_terms($engine = 'google') {
global $s, $s_array;
$referer = urldecode($_SERVER[HTTP_REFERER]);
$referer = urldecode($_SERVER['HTTP_REFERER']);
$query_array = array();
switch ($engine) {
case 'google':
@ -58,6 +58,9 @@ function get_search_query_terms($engine = 'google') {
function is_referer_search_engine($engine = 'google') {
$siteurl = get_settings('home');
if( empty($_SERVER['HTTP_REFERER']) ) {
return 0;
}
$referer = urldecode($_SERVER['HTTP_REFERER']);
//echo "referer is: $referer<br />";
if ( ! $engine ) {
@ -131,4 +134,4 @@ add_filter('the_content', 'hilite');
add_filter('comment_text', 'hilite');
add_action('wp_head', 'hilite_head');
?>
?>