[wp-cvs] wordpress/wp-content/plugins google-hilite.php,1.6,1.7
Ryan Boren
rboren at users.sourceforge.net
Mon Sep 27 00:46:44 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-content/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26960/wp-content/plugins
Modified Files:
google-hilite.php
Log Message:
Use get_query_var to get the search terms.
Index: google-hilite.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-content/plugins/google-hilite.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** google-hilite.php 13 Jul 2004 18:14:54 -0000 1.6
--- google-hilite.php 27 Sep 2004 00:46:42 -0000 1.7
***************
*** 11,15 ****
/* Highlighting code c/o Ryan Boren */
function get_search_query_terms($engine = 'google') {
! global $s, $s_array;
$referer = urldecode($_SERVER['HTTP_REFERER']);
$query_array = array();
--- 11,17 ----
/* Highlighting code c/o Ryan Boren */
function get_search_query_terms($engine = 'google') {
! $search = get_query_var('s');
! $search_terms = get_query_var('search_terms');
!
$referer = urldecode($_SERVER['HTTP_REFERER']);
$query_array = array();
***************
*** 39,46 ****
// aren't in the referer.
if ( ! preg_match('/^.*s=/i', $referer)) {
! if (isset($s_array)) {
! $query_array = $s_array;
! } else if (isset($s)) {
! $query_array = array($s);
}
--- 41,48 ----
// aren't in the referer.
if ( ! preg_match('/^.*s=/i', $referer)) {
! if (!empty($search_terms)) {
! $query_array = $search_terms;
! } else if (isset($search)) {
! $query_array = array($search);
}
More information about the cvs
mailing list