[php-blog-cvs] r1790 - trunk/plugins/serendipity_event_searchhighlight
A reliable, secure & extensible PHP blog | Not mainstream since 2002
Brought to you by:
garvinhicking,
jhermanns
From: garvinhicking at B. <gar...@ma...> - 2007-07-20 09:14:54
|
Author: garvinhicking Date: 2007-07-20 11:14:43 +0200 (Fri, 20 Jul 2007) New Revision: 1790 Modified: trunk/plugins/serendipity_event_searchhighlight/serendipity_event_searchhighlight.php Log: improved plugin Modified: trunk/plugins/serendipity_event_searchhighlight/serendipity_event_searchhighlight.php =================================================================== --- trunk/plugins/serendipity_event_searchhighlight/serendipity_event_searchhighlight.php 2007-07-20 09:14:33 UTC (rev 1789) +++ trunk/plugins/serendipity_event_searchhighlight/serendipity_event_searchhighlight.php 2007-07-20 09:14:43 UTC (rev 1790) @@ -29,7 +29,7 @@ $propbag->add('description', PLUGIN_EVENT_SEARCHHIGHLIGHT_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Tom Sommer'); - $propbag->add('version', '1.3'); + $propbag->add('version', '1.4'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -116,8 +116,11 @@ return PLUGIN_EVENT_SEARCHHIGHLIGHT_AOL_COM; } + if (!empty($_SESSION['search_referer']) && $this->uri != $_SESSION['search_referer']) { + $this->uri = $_SESSION['search_referer']; + return $this->getSearchEngine(); + } - return false; } @@ -192,6 +195,9 @@ return; } + $_SESSION['is_searchengine_visitor'] = true; + $_SESSION['search_referer'] = $this->uri; + foreach ($this->markup_elements as $temp) { if ( ! (serendipity_db_bool($this->get_config($temp['name'])) && isset($eventData[$temp['element']])) ) { continue; |