]> git.mjollnir.org Git - s9y.git/commitdiff
some debugging output
authorgarvinhicking <garvinhicking>
Tue, 23 Aug 2005 09:51:08 +0000 (09:51 +0000)
committergarvinhicking <garvinhicking>
Tue, 23 Aug 2005 09:51:08 +0000 (09:51 +0000)
plugins/serendipity_event_livesearch/serendipity_event_livesearch.php

index fbe99bd780ab8c0d78c45130b3788a66c3cec57e..0526c499f0d46d7572842f43a4c6d979a028f275 100644 (file)
@@ -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;