From 9642cf2bbafda79b692a05f483d29431e6a4ec46 Mon Sep 17 00:00:00 2001 From: josch Date: Fri, 16 May 2008 22:02:08 +0000 Subject: [PATCH] corrected query string in results instead of page git-svn-id: http://yolanda.mister-muffin.de/svn@351 7eef14d0-6ed0-489d-bf55-20463b2d70db --- trunk/search.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/trunk/search.pl b/trunk/search.pl index 6b05cc1..acea370 100644 --- a/trunk/search.pl +++ b/trunk/search.pl @@ -26,13 +26,15 @@ if($query->param('query')) { #fill xml with search results $page->appendChild(fill_results($dbquery, @args)); - $page->setAttribute('query', $query->param('query')); $doc->setDocumentElement($page); - #get all results + #get all found results my @results = $doc->findnodes( "//results/result" ); + #set result query in result's parent + $results[0]->parentNode->setAttribute('query', $query->param('query')); + #if result count is zero if($#results == -1) {