diff options
Diffstat (limited to 'src/search_php.h')
-rw-r--r-- | src/search_php.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/search_php.h b/src/search_php.h index 3380cee..d75a95c 100644 --- a/src/search_php.h +++ b/src/search_php.h @@ -140,7 +140,7 @@ " {\n" " $key=$di[\"url\"];\n" " $rank=$di[\"rank\"];\n" -" if (in_array($key, array_keys($docs)))\n" +" if ($docs[$key])\n" " {\n" " $docs[$key][\"rank\"]+=$rank;\n" " }\n" @@ -219,10 +219,13 @@ "\n" "function report_results(&$docs)\n" "{\n" +" echo \"<div class=\\\"header\\\">\";\n" +" echo \" <div class=\\\"headertitle\\\">\\n\";\n" +" echo \" <h1>\".search_results().\"</h1>\\n\";\n" +" echo \" </div>\\n\";\n" +" echo \"</div>\\n\";\n" +" echo \"<div class=\\\"searchresults\\\">\\n\";\n" " echo \"<table cellspacing=\\\"2\\\">\\n\";\n" -" echo \" <tr>\\n\";\n" -" echo \" <td colspan=\\\"2\\\"><h2>\".search_results().\"</h2></td>\\n\";\n" -" echo \" </tr>\\n\";\n" " $numDocs = sizeof($docs);\n" " if ($numDocs==0)\n" " {\n" @@ -279,7 +282,6 @@ " $query=$_GET[\"query\"];\n" " }\n" " end_form(preg_replace(\"/[^a-zA-Z0-9\\-\\_\\.]/i\", \" \", $query ));\n" -" echo \" \\n<div class=\\\"searchresults\\\">\\n\";\n" " $results = array();\n" " $requiredWords = array();\n" " $forbiddenWords = array();\n" @@ -307,6 +309,7 @@ " // report results to the user\n" " report_results($sorted);\n" " echo \"</div>\\n\";\n" +" end_page();\n" " fclose($file);\n" "}\n" "\n" |