Skip to content
Snippets Groups Projects
Commit f93b3b50 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

fix highlighting of search engine referer keywords for recent highlight change

darcs-hash:20080215175816-7ad00-f12f54210dceacf4b3580e78b2f86a21a23b4315.gz
parent 60c15d7d
No related branches found
No related tags found
No related merge requests found
...@@ -986,15 +986,17 @@ function getGoogleQuery(){ ...@@ -986,15 +986,17 @@ function getGoogleQuery(){
$query = array(); $query = array();
parse_str($url['query'],$query); parse_str($url['query'],$query);
if(isset($query['q'])) if(isset($query['q']))
return $query['q']; // google, live/msn, aol, ask, altavista, alltheweb, gigablast $q = $query['q']; // google, live/msn, aol, ask, altavista, alltheweb, gigablast
elseif(isset($query['p'])) elseif(isset($query['p']))
return $query['p']; // yahoo $q = $query['p']; // yahoo
elseif(isset($query['query'])) elseif(isset($query['query']))
return $query['query']; // lycos, netscape, clusty, hotbot $q = $query['query']; // lycos, netscape, clusty, hotbot
elseif(preg_match("#a9\.com#i",$url['host'])) // a9 elseif(preg_match("#a9\.com#i",$url['host'])) // a9
return urldecode(ltrim($url['path'],'/')); $q = urldecode(ltrim($url['path'],'/'));
return ''; if(!$q) return '';
$q = join('|',preg_split('/[\s\'"\\\\`()\]\[?:!\.{};,#+*<>\\/]+/',$q,-1,PREG_SPLIT_NO_EMPTY));
return $q;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment