mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 05:18:42 +01:00
HTTP_REFERER fixes from Joseph Scott. http://wordpress.org/support/6/6657
git-svn-id: https://develop.svn.wordpress.org/trunk@1378 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1afcf75ea7
commit
b967d4e894
@ -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');
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user