From: garvinhicking <garvinhicking> Date: Tue, 23 Aug 2005 09:51:08 +0000 (+0000) Subject: some debugging output X-Git-Tag: 0.9~187 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=df0a6a7d5f34bef65295dfd1cb780fcf535f67fb;p=s9y.git some debugging output --- diff --git a/plugins/serendipity_event_livesearch/serendipity_event_livesearch.php b/plugins/serendipity_event_livesearch/serendipity_event_livesearch.php index fbe99bd..0526c49 100644 --- a/plugins/serendipity_event_livesearch/serendipity_event_livesearch.php +++ b/plugins/serendipity_event_livesearch/serendipity_event_livesearch.php @@ -22,7 +22,7 @@ class serendipity_event_livesearch extends serendipity_event $propbag->add('description', PLUGIN_EVENT_LIVESEARCH_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Christian Stocker, Garvin Hicking'); - $propbag->add('version', '1.1'); + $propbag->add('version', '1.2'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -137,15 +137,19 @@ class serendipity_event_livesearch extends serendipity_event break; case 'ls': + header('X-Search: ' . htmlspecialchars($_REQUEST['s'])); $res = serendipity_searchEntries($_REQUEST['s']); + echo '<?xml version="1.0" encoding="utf-8" ?>'; + echo '<div class="serendipity_livesearch_result">'; + if (is_array($res) && count($res) > 0) { - echo '<?xml version="1.0" encoding="utf-8" ?>'; - echo '<div class="serendipity_livesearch_result">'; foreach($res AS $id => $entry) { echo '<div class="serendipity_livesearch_row"><a href="' . serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL', true, array('timestamp' => $entry['timestamp'])) . '">' . htmlspecialchars($entry['title']) . '</a></div>'; } echo '</div>'; + } else { + echo '<div class="serendipity_livesearch_row">' . print_r($res, true) . '</div>'; } break;