Some minor updates to the site and search API.
This commit is contained in:
parent
43d97e41e1
commit
1428652b84
5 changed files with 86 additions and 4 deletions
|
|
@ -76,8 +76,15 @@
|
|||
/* Read the results and turn into urls */
|
||||
$count = 0;
|
||||
while ($result_line = stream_get_line ($fh, 0, "\n")) {
|
||||
print ("• <a href=\"https://slackware.uk$result_line\" title=\"$result_line\">$result_line</a><br>");
|
||||
$count++;
|
||||
$type = strtok ($result_line, " ");
|
||||
$entry = strtok ("\n");
|
||||
if ($type == "f" || $type == "l" || $type == "o") {
|
||||
print ("• <a href=\"$entry\" title=\"View $entry\">$entry</a><br>");
|
||||
$count++;
|
||||
} elseif ($type == "d") {
|
||||
print ("• <a href=\"$entry\" title=\"Directory $entry\">$entry</a> (<a href=\"/search?l=$_GET[l]&p=$entry&q=" . str_replace (" ", "+", $_GET[q]) . "\" title=\"Repeat search in this directory\">Repeat search in this directory</a>)<br>");
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
/* Output a total */
|
||||
if ($count == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue