X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/fa30f71a6ab727c90e0b600582f9944dfaa1ca89..a6e2e74ced2c2a0aa816b2002c5d7d037b45f436:/search.php?ds=sidebyside
diff --git a/search.php b/search.php
index e1da846..0b15607 100644
--- a/search.php
+++ b/search.php
@@ -1,17 +1,58 @@
$limit) {
+ shuffle($results); // avoid alphabetical top set
+ }
+}
+
+if (isset($Place['verbose'])) {
+ printf("
%s gevonden voor %s
:
\n",
+ $results ? count($results).' resultaten' : 'Niets',
+ htmlspecialchars($query)
+ );
}
require_once('nieuws.inc.php');
-print '';
+
+if (!$results) {
+ print "Niets gevonden.";
+ return;
+}
+if (count($results) > $limit) {
+ array_splice($results, $limit);
+}
+
+if ($limit > 1) {
+ print '';
+}
foreach ($results as $result) {
$page = new ArchiveArticle($result);
- printf('- %s
'."\n", $page->link, $page->name);
+ $name = sprintf('%s', $page->link, $page->name);
+ print $limit > 1 ? "- $name
\n" : $name;
+}
+if ($limit > 1) {
+ print "
\n";
}
-print "
\n";